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 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::stored_head_type' (or
there is no acceptable conversion)
with
[
HT=const boost::lambda::detail::parameter_traits_::RET>::type,
TT=boost::tuples::detail::map_tuple_to_consboost::tuples::null_type,boost::tuples::null_type,boost::tuples::null_type,b...::type
]
======================================================
With gcc 3.4.4, I get a moderately sized novel, whose last line reads:
=====
/usr/local/include/boost/lambda/detail/operator_lambda_func_base.hpp:136:
error: conversion from `int' to non-scalar type
`boost::lambda::detail::unspecified' requested
=======================================================
This is boost version 1.33.1.
What could be wrong?
thx