Listing 2: Broken example’s diagnostics

algorithm(37) : error C2664: '()' :
cannot convert parameter 1 from
'class E'
to
'class E *const & '

Reason: cannot convert from
'class E'
to
'class E *const '

No user-defined-conversion operator available
that can perform this conversion, or the
operator cannot be called

test.cpp(42) : see reference to
function template instantiation
'class std::binder2nd
<class std::mem_fun1_ref_t<void,class E,int> >
__cdecl std::for_each
 (
class E *,class E *,
class std::binder2nd
<class std::mem_fun1_ref_t<void,class E,int> >
)' 

being compiled
— End of Listing —