|
Boost : |
Subject: Re: [boost] Interest in bounded (Top-Bounded) Range adaptor.
From: Fernando Pelliccioni (fpelliccioni_at_[hidden])
Date: 2011-10-31 11:56:03
On Mon, Oct 31, 2011 at 12:31 PM, Nathan Ridge <zeratul976_at_[hidden]>wrote:
>
> > Is there interest in adding a Top-Bounded adaptor into Boost.Range ?
> >
> > Example:
> >
> > using namespace boost::adaptors;
> > using namespace boost::assign;
> >
> > std::vector<int> input;
> > input += 1,2,3,4,5,6,7,8,9;
> >
> > boost::copy( input | bounded(0), std::ostream_iterator<int>(std::cout,
> > ",")); // prints nothing
> > boost::copy( input | bounded(1), std::ostream_iterator<int>(std::cout,
> > ",")); // prints 1,
> > boost::copy( input | bounded(2), std::ostream_iterator<int>(std::cout,
> > ",")); // prints 1,2,
> > boost::copy( input | bounded(8), std::ostream_iterator<int>(std::cout,
> > ",")); // prints 1,2,3,4,5,7,8,
>
> There is a Boost.Range extension library called P-stade Oven which
> provides this adaptor under the name "taken", and many other adaptors:
>
> http://p-stade.sourceforge.net/oven/doc/html/index.html
>
> There exists an effort to port the P-stade Oven library to Boost, called
> OvenToBoost: https://github.com/faithandbrave/OvenToBoost.
> If you are interested in seeing functionality like this in Boost, perhaps
> you can consider contributing to this effort.
>
"taken" is what I was looking for.
I will contact the project owners to offer my help.
Thanks!!
Regards,
Fernando.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk