
7 Apr
2008
7 Apr
'08
6:06 p.m.
Hi, these snipped doesn't compile, but why? ---8<--- #include <iostream> #include <boost/array.hpp> #include <boost/lambda/lambda.hpp> int main() { using namespace ::boost::lambda; boost::array<double, 10> values; for_each( values.begin(), values.end(), _1 = 2.0 ); for_each( values.begin(), values.end(), std::cout << _1 << '\n'); } --->8--- error: 'for_each' was not declared in this scope using std::list compiles and works. Did I miss something? Thanks, Olaf