|
Boost : |
From: Dean Michael Berris (mikhailberis_at_[hidden])
Date: 2007-11-20 06:23:14
On Nov 20, 2007 12:37 AM, Giovanni Piero Deretta <gpderetta_at_[hidden]> wrote:
> On Nov 20, 2007 8:43 AM, Dean Michael Berris <mikhailberis_at_[hidden]> wrote:
> > [...]
> > Recently, I've implemented a simple utility which allows users to
> > select the nth element of an STL pair / Boost.Tuple in conjunction
> > with STL algorithms.
> > [...]
>
> This doesn't return the right thing with non const parameters. A very
> simple result_of compatible wrapper around fusion::at_c will do. In fact
> I think that fusion should provide function objects for every one of its
> algorithm.
>
You mean:
std::pair<int, int> pair(1, 2);
std::cout << boost::select<1>()(pair) << std::endl; // should output 2
?
I think I'm missing something here... Can you elaborate?
-- 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