Boost logo

Boost :

From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2007-11-19 14:35:25


Hi Eric!

On Nov 19, 2007 11:54 PM, Eric Niebler <eric_at_[hidden]> wrote:
> Dean Michael Berris wrote:
> >
> > * Boost.Range friendly versions of the STL algorithms
>
> The Range_ex library is quite possibly what you're looking for.
>
> http://www.boost-consulting.com/vault/index.php?directory=Algorithms
>
> Documentation is here:
>
> http://boost-sandbox.sf.net/libs/range_ex
>
> This work is based on an earlier containers algorithm library by Jeremy
> Siek and Vladimir Prus.
>

Thank you very much! This definitely looks like something worth
looking at. Is there any chance this work can get completed soon? Or
is there just too many STL algorithms to 're-implement'?

I'm quite possibly looking at helping here if there's anybody else
needing help with the implementation of this library.

>
> > * SGI's select1st and select2nd generalized -- I'm not sure if you've
> > found yourself dealing with std::map's and std::list<std::pair<,> >'s
> > a lot, but I do, and there is a lot of merit in something like the
> > following:
> >
> > template <const N>
> > struct select {
> > template <class T>
> > mpl::at_c<T, N>::type operator() (T element) const {
> > return mpl::at_c<T, N>(element);
> > };
> > };
> >
> > So that you can go ahead and see code like (with the STL adapters from above):
> >
> > std::transform(
> > boost::make_range(my_map),
> > select<1>(),
> > std::ostream_iterator<my_map::value_type::second_type>(std::cout)
> > );
>
>
> Could be pretty useful. I'm not aware of anything like this in Boost
> already.
>

Great! So in this regard, I'm attaching a simple initial
implementation of the select<> template. If there's anyone interested
in expounding on this library, I don't mind getting all the help I can
get.

Currently it's tested and made to generalize the selector function
object to work with std::pair<,>'s and boost::tuple<>'s.

Could this simple header library be put into the Fast Track review queue?

-- 
Dean Michael C. Berris
Software Engineer, Friendster, Inc.
[http://cplusplus-soup.blogspot.com/]
[mikhailberis_at_[hidden]]
[+63 928 7291459]
[+1 408 4049523]



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