|
Boost Users : |
Subject: Re: [Boost-users] [fusion] .at<N>() template member in containers?
From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2010-10-06 16:21:52
-----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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkys2mAACgkQ5vihyNWuA4Wd+wCff6IeuTbsJj0GVqPrqaGanKEG
9ogAoM/nwd7GCdR4IzYR2i5lBLhfyx1z
=ojtF
-----END PGP SIGNATURE-----
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