
On Tue, Mar 23, 2010 at 6:02 PM, Ovanes Markarian
Hi!
This one works...
#include
#include #include #include <algorithm> #include <vector> struct A { A(int) {} void f()const {} };
int main( ) { using namespace boost::lambda;
std::vector< int > v; std::for_each( v.begin( ), v.end(), bind(&A::f, bind<A>(constructor<A>(), _1))); }
It does indeed, making method f() const fixes it, but I still can't quite
see why. Without the
constness of f() the guts of the error says this,
/usr/include/boost/lambda/detail/actions.hpp:87: error: no matching function
for call to ‘boost::lambda::function_adaptor