
18 Mar
2011
18 Mar
'11
5:03 p.m.
Hi, I thought that lambda expressions of the form: (var(actual_var) = _1)(new_value) are supposed to work. Here's a small code that does not compile with boost 1.42 and gcc4.5: #include <map> #include <boost/lambda/lambda.hpp> using namespace std; void foo() { using namespace boost::lambda; typedef multimap<int, int> MP; MP mp1; MP mp2; (var(mp1) = _1)(mp2); //compile-time error here } Are standard maps special in that regard? Thanks, Andy.