
18 Mar
2011
18 Mar
'11
5:36 p.m.
AMDG On 03/18/2011 10:03 AM, Andy Venikov wrote:
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:
What's the error? It works for me with msvc 10 and the trunk.
#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?
In Christ, Steven Watanabe