Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-10-04 14:28:40

There are several changes I'd like to see made to iterator_adaptors:

1. Remove the "less" function from the Policies class (i.e. implement it in
terms of distance), so the interface is compatible with what's described in
the paper at:

2. Rework all policies functions to accept the full iterator_adaptor in
place of the Base object.

3. Rename "bind" where used to something more appropriate, so the problem
Peter refers to with MSVC will disappear.

This would be a perfect opportunity for anyone with interest in a fix,
especially someone who would like to contribute, but doesn't have a full
library to submit yet. Get your feet wet as a boost library developer (your
name will be included in the acknowledgements)!


  David Abrahams, C++ library designer for hire

        C++ Booster (
          email: david.abrahams_at_[hidden]

----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, October 04, 2001 2:38 PM
Subject: Re: [boost] problems with the current boost's functional,

> From: "Levente Farkas" <lfarkas_at_[hidden]>
> > there is a functional.hpp which enhanced function object adaptors, but
> > it doesn't contain the sgi's extensions like unary_compose, compose1...
> > on the other hand compose.hpp doesn't use call_traits so there can be
> > "references to references" problem same as with the original functional
> > and sgi's implementation. the same problem occur with bind.hpp.
> > the possible solutions:
> > std::compose1(f, g)
> > boost::compose_f_gx(f, g)
> > boost::bind(f, boost::bind(g, _1))
> > Lambda Library is not usable on MSVC:-(
> I'm not sure what your problem really is.
> boost::bind defines result_type as the exact return type of its
> when I modify your example to use it:
> std::copy(
> boost::make_const_projection_iterator(a.begin(),
> boost::bind<double &>(VectorAccess<std::vector<double> >(0),
> boost::bind<std::vector<double> &>(MemberAccess<A, std::vector<double>
> >(&A::y), _1))),
> boost::make_const_projection_iterator(a.end(),
> boost::bind<double &>(VectorAccess<std::vector<double> >(0),
> boost::bind<std::vector<double> &>(MemberAccess<A, std::vector<double>
> >(&A::y), _1))),
> v.begin());
> I get a reference to reference error within the iterator adaptors library,
> so any changes to functional.hpp and/or compose.hpp are unlikely to fix
> that.
> (Unfortunately the iterator adaptors still contain nested bind class
> templates, sigh. So bind and the iterator adaptors can't both be used on
> MSVC.)
> --
> Peter Dimov
> Multi Media Ltd.
> Info: Unsubscribe:
> Your use of Yahoo! Groups is subject to

Boost list run by bdawes at, gregod at, cpdaniel at, john at