1 Oct 2006 01:13
lambda boost::array operator[] error
Levent Yilmaz <sly5+gmane <at> pitt.edu>
2006-09-30 23:13:18 GMT
2006-09-30 23:13:18 GMT
Hi All, Please take a look these two similar set of statements. One uses vector, the other boost::array : /**/ using std::vector; using boost::array; using std::for_each; using boost::lambda::_1; // This one compiles: typedef vector<int> Vector; Vector v(2); vector<Vector> vv(5,v); for_each( vv.begin(), vv.end(), (_1[0]=10, _1[1]=9) ); // This one doesn't: typedef array<int,2> Array; vector<Array> va(5); for_each( va.begin(), va.end(), (_1[0]=10, _1[1]=9) ); /**/ With MSVC 7.1, I get: ===== d:\boost\include\boost-1_33_1\boost\lambda\detail\operator_lambda_func_base.hpp(237): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'const boost::tuples::cons<HT,TT>::stored_head_type' (or(Continue reading)
RSS Feed