|
Boost Users : |
Subject: [Boost-users] [fusion] .at<N>() template member in containers?
From: alfC (alfredo.correa_at_[hidden])
Date: 2010-10-06 14:56:28
Hi,
Excuse my simple minded questions. Sometimes by asking this question
(often with negative answer) I understand more on the design of the
Boost libraries.
Besides possible redundancy, why is that the fusion containers, for
example fusion::vector, doesn't have a template member function to
extract elements?
fusion::vector<double, int, std::string> stuff(1.2, 3, "hola");
stuff.at<2>(); //returns "hola", just like at_c<2>(stuff);
Wouldn't it be more consistent with std::vector v, v[2] or v.at(2);
By the way, does anybody know where the name given "at_c" (I mean the
'_c') comes from?
Thank you,
Alfredo
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