|
Boost Users : |
Subject: Re: [Boost-users] [lambda] shared_ptr's in lambda expressions
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-06-29 10:49:13
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net