On Wed, Oct 6, 2010 at 12:09 PM, michi7x7 <mailing-lists@michi7x7.de> wrote:
 Hi
Besides possible redundancy, why is that the fusion containers, for
example fusion::vector, doesn't have a template member function to
extract elements?
what do you mean? .at<>() is a template member function.
at_c<N>() is from Boost.Spirit and uses .at<>() internally (i guess).

it doesn't seem so:

    vector<double, double, double> bfv;
    clog << bfv.at<0>() << endl; //ERROR
 error: ‘struct boost::fusion::vector<double, double, double, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_, boost::fusion::void_>’ has no member named ‘at’

 
Wouldn't it be more consistent with std::vector v, v[2] or v.at(2);
That's not possible, because the return-type has to be known during compile-time. You can't do this with "normal" arguments.

presicely, I am asking for .at<N>() (I just noticed that boost::tuples have .get<N>() member)

Thanks for the answer,
Alfredo