Boost logo

Boost Users :

Subject: Re: [Boost-users] [tuple] Function object for nth element of a tuple
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2009-07-05 16:39:04


On Sun, 5 Jul 2009, joel wrote:

> Jeremiah Willcock wrote:
>> That does not appear to be a function object, but a plain function. Also,
>> shouldn't something like this (and getting the nth element type from a
>> tuple) be in the tuple library itself?
> More like :
> http://www.boost.org/doc/libs/1_39_0/libs/fusion/doc/html/fusion/sequence/intrinsic/functions/at_c.html
> and :
> http://www.boost.org/doc/libs/1_39_0/libs/fusion/doc/html/fusion/sequence/intrinsic/metafunctions/at_c.html
>
> But a quick look at the implementation, it's not a PFO even if it supports
> the result_of protocol.

I wanted something that would be a particular class, not a function
object, for efficiency reasons. I ended up writing my own, but can still
replace it if get_class is fixed up. It would be good to have it in 1.40
so I can fix my code in 1.40 that uses it.

-- Jeremiah Willcock


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net