25 Jul
2009
25 Jul
'09
7:20 p.m.
AMDG Kim Kuen Tang wrote:
the following code
double abc=lambda(_a=*ref(it)++)[_a*2.0]()(); // here 'it' is an //iterator
produces the error C2440: 'initializing' : cannot convert from 'boost::phoenix::detail::error_expecting_arguments' to 'double'
which should not be. The two lines of code
let(_a=*ref(it)++)[_a*2.0](); //or
lambda(_a=*ref(it)++)[_a*2.0*arg1]()( val);
compile fine.
Perhaps someone has an answer to this error? ( I use boost trunk version and msvc 2008)
To reproduce the errors just compile the code below.
The problem is that no_nullary doesn't handle local variables well. Fixing this will require propagating the variables that are undefined up through every subexpression. In Christ, Steven Watanabe