
29 Jun
2009
29 Jun
'09
2:49 p.m.
Michael Crawford wrote:
(boost::lambda::_1 ->* &Log::getName) == name
This should be (boost::lambda::_1 ->* &Log::getName)() == name because getName is a function.
boost::bind(&Log::getName, boost::bind(&LogPtr::get, _1)) == name
boost::bind( &Log::getName, _1 ) == name is enough; boost::bind handles shared_ptr directly. With lambda, you need lambda::bind( &Log::getName, *_1 ) == name