Posted Dec 8, 2005 11:22 UTC (Thu) by mvogt
In reply to: lambda functions
Parent article: The Boost C++ Libraries
There is a special function; you can use
for_each(a.begin(), a.end(), std::cout << constant("blups:") << _1 << constant(' '));
to defer evaluation of the insertion operators until the lambda function is invoked. (You don't need the second 'constant' really; it will be deduced.)
There is also a 'var' function for deferring modifiable variables.
to post comments)