I would like to pass a lambda to a funciton.
This
boost::function<void()> fncPtr(boost::bind<void>([](){/* something */}));
works, but if the lambda had a parameter, I don't know how to do it properly:
boost::function<void(bool)>
fncPtr(boost::bind<void,bool>([](bool){/* something */}, _1));
does not work.
Where I am wrong? How to pass lambda with argument(s)?
I would like to do this in a member function. So in "global scope"(is it the name?) this method above works fine.
bind; but that's hardly the point.)