M
Marc
T x;
T foo(T, T);
bind1st(ptr_fun(foo), x)
creates a function object that takes an argument of type T const&. This
does not work if T is already a reference type like int const&. So my
first problem is with the &. My second problem is with the const. Why
should bind1st change the constness of the second argument of the
function ?
I am currently using boost::bind instead, but I would rather not depend
on boost for all my programs...
T foo(T, T);
bind1st(ptr_fun(foo), x)
creates a function object that takes an argument of type T const&. This
does not work if T is already a reference type like int const&. So my
first problem is with the &. My second problem is with the const. Why
should bind1st change the constness of the second argument of the
function ?
I am currently using boost::bind instead, but I would rather not depend
on boost for all my programs...