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:22:35


On Sun, 5 Jul 2009, joel wrote:

> Jeremiah Willcock wrote:
>> Is there a standard way to get a function object that extracts a fixed
>> element from a tuple? There is a boost::tuples::detail::get_class<N> that
>> does what I want, but it does not have result_type and does not appear to
>> be officially supported.
> isn't boost::fusion::at_c a proper PFO that works on tuple ?

Do you mean <URL:http://spirit.sourceforge.net/dl_more/fusion_v2/libs/
fusion/doc/html/fusion/sequence/intrinsic/functions/at_c.html>? 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?

-- 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