
29 Sep
2008
29 Sep
'08
4:11 p.m.
Eric Niebler:
Lambda and phoenix differ as to whether local variables are captured by value or by reference (phoenix always captures by value, lambda tries to guess what you intend based on usage).
Are you sure that int v[] = { 1, 2, 3 }; std::for_each( v, v + 3, std::cout << arg1 << std::endl ); captures std::cout by value? :-)