Correct use of boost lambda
Posted
by Niels P.
on Stack Overflow
See other posts from Stack Overflow
or by Niels P.
Published on 2010-05-13T11:49:58Z
Indexed on
2010/05/13
11:54 UTC
Read the original article
Hit count: 221
Consider the following piece of C++0x code:
a_signal.connect([](int i) {
if(boost::any_cast<std::string>(_buffer[i]) == "foo")
{
base_class<>* an_object = new derived_class();
an_object->a_method(_buffer[i]);
}});
How would it correctly look in Boost Lambda (since this C++0x feature can't be used yet)?
© Stack Overflow or respective owner