Hi All
I believe boost.bind has the capability to look through pointers and smart pointers to
transparently process the pointed-to objects. Does boost.lambda.bind also have this
capability?
No, but you should be able to use bind( &A::f, *_1 ) for that.
_______________________________________________
Boost-users mailing list
Boost...@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Peter Dimov wrote:
> Robert Jones wrote:
>> I believe boost.bind has the capability to look through pointers and
>> smart
>> pointers to
>> transparently process the pointed-to objects. Does boost.lambda.bind
>> also
>> have this
>> capability?
>
> No, but you should be able to use bind( &A::f, *_1 ) for that.
This should work unless A is an abstract type.
In Christ,
Steven Watanabe
Robert Jones wrote:No, but you should be able to use bind( &A::f, *_1 ) for that.
Hi All
I believe boost.bind has the capability to look through pointers and smart
pointers to
transparently process the pointed-to objects. Does boost.lambda.bind also
have this
capability?
It should pass by reference.
You could also use bind( mem_fn( &A::f ), _1 ), if you like that better.
This is what boost::bind does under the hood, more or less.
AMDG
Peter Dimov wrote:This should work unless A is an abstract type.
Robert Jones wrote:
I believe boost.bind has the capability to look through pointers and smart
pointers to
transparently process the pointed-to objects. Does boost.lambda.bind also
have this
capability?
No, but you should be able to use bind( &A::f, *_1 ) for that.
Robert Jones wrote:
> On Wed, Mar 24, 2010 at 3:15 PM, Steven Watanabe <watan...@gmail.com>wrote:
>
>> Peter Dimov wrote:
>>
>>> No, but you should be able to use bind( &A::f, *_1 ) for that.
>>>
>> This should work unless A is an abstract type.
>>
> I don't understand this; if this passes by reference as Peter states in this
> thread, why can
> A not be an abstract type?
>
Because of a long standing bug in the return type deduction mechanism.