Boost logo

Boost :

From: shunsuke (pstade.mb_at_[hidden])
Date: 2007-11-20 13:21:57


Giovanni Piero Deretta 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.

BTW, fusion::at might return non-reference.
Also, range_reference<> type of input range might be non-reference or even proxy.
It is not so easy to implement generic range adaptor to extract nth element of tuple.

Regards,

-- 
Shunsuke Sogame

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