On Wed, Oct 6, 2010 at 1:21 PM, Frank Mori Hess <frank.hess@nist.gov> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 06 October 2010, alfC wrote:
> 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 that require template specializations of the "at()" member template
for its differing return types?  IIRC, C++ doesn't let you specialize
template members of template classes.

It does not seem to be a technical problem, tuples have member functions

tuples<int, double, string> t;
t.get<2>(); // a string

 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkys2mAACgkQ5vihyNWuA4Wd+wCff6IeuTbsJj0GVqPrqaGanKEG
9ogAoM/nwd7GCdR4IzYR2i5lBLhfyx1z
=ojtF
-----END PGP SIGNATURE-----
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users

--
Sie haben diese Nachricht erhalten, da Sie der Google Groups-Gruppe Boost Users beigetreten sind.
Wenn Sie Nachrichten in dieser Gruppe posten möchten, senden Sie eine E-Mail an boostusers@googlegroups.com.
Wenn Sie aus dieser Gruppe austreten möchten, senden Sie eine E-Mail an boostusers+unsubscribe@googlegroups.com.
Besuchen Sie die Gruppe unter http://groups.google.com/group/boostusers?hl=de, um weitere Optionen zu erhalten.