
9 Aug
2006
9 Aug
'06
7:10 p.m.
What is the proper syntax for using lamda with with array? i.e. how do I do something like namespace lambda = ::boost::lambda; boost::array< boost::array<int,2>, 4 > foo = {{ {-1,1}, {0,0}, {1,-1}, {2,-2} }}; std::for_each( foo.begin(), foo.end(), std::cout << lambda::constant( "first = " ) << lambda::_1[0] << ' ' << lambda::constant( "second = " ) << lambda::_1[1] << '\n' ); Thanks