Boost logo

Boost :

From: Giovanni Bajo (giovannibajo_at_[hidden])
Date: 2002-05-13 08:06:12


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, May 13, 2002 2:32 PM
Subject: Re: [boost] bind/mem_fn missing documentation?

> From: "David Abrahams" <david.abrahams_at_[hidden]>
> > Was the feature mentioned here
> > http://aspn.activestate.com/ASPN/Mail/Message/1169892 ever documented?
If
> > so, I don't see it. If not it would be really great to get it into the
> > documentation on the release candidate branch before we release boost
> > 1.28.0...
>
> No, the feature isn't documented yet. It's still labeled "experimental" in
> my mind... I'll document it post-release.

Since we are at it, can we dereference through boost::bind?

std::list<int*> ml;
void dosomething(int a) { }

std::for_each(ml.begin(), ml.end(), boost::bind(domsething, deref(_1)));

> std::pair<int, int> * p = &x;
> boost::bind(&std::pair<int, int>::first, _1)(p);

Does that basically returns p->first? So, bind() automatically dereference a
pointer when using this feature?

Giovanni Bajo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk