23 May
2007
23 May
'07
8:59 p.m.
I tried BOOST_FOREACH on a slightly modified version of the sample in the documentation. Instead of iterating by value, I iterate by reference: extern std::vector<float> get_vector_float(); BOOST_FOREACH( float& f, get_vector_float() ) { } When compiling with VisualC++ 8.0, I receive the following error message: error C2440: 'initializing' : cannot convert from 'const float' to 'float &' Conversion loses qualifiers Is there a work-around ? - Daniel -- View this message in context: http://www.nabble.com/BOOST_FOREACH-and-iterating-by-reference-tf3806531.htm... Sent from the Boost - Users mailing list archive at Nabble.com.