Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-11-23 09:28:24


From: "Aleksey Gurtovoy" <alexy_at_[hidden]>
> Peter Dimov wrote:
> > > I would check in the fix myself ('cause I need it :),
> >
> > Out of curiosity, why do you need it?
>
> struct something
> {
> int id() const;
> };
>
> mtn::vector<something*> some_things;
> mtn::vector<std::string> result(mtn::transformed_seq(
> some_things
> , boost::compose_f_gx(
> std::ptr_fun(mtn::to_string)
> , boost::mem_fn(&something::id)
> )
> ));

Why not

boost::bind(mtn::to_string, boost::bind(&something::id, _1))

?

> > Impoliteness aside, making changes to other libraries without
> > warning has an additional downside: if the library doesn't
> > pass the regression tests, the failure gets attributed to you,
> > although it might be a prior change that caused the test to fail.
>
> You got me puzzled here. Could you explain how does the above work? :)

Hm. What might happen is this:

* I make a change to mem_fn.hpp.
* You make a change to mem_fn.hpp.
* mem_fn_test.cpp fails.
* You get blamed for the failure even though it might be my fault.

So it's best to coordinate updates. ;-)

--
Peter Dimov
Multi Media Ltd.

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