Tuple how to get the TYPE of the n-th element?
Hi
I working with tuples, and that tuples are constructed by K elements. For me
interesting are 1-st, 2-nd and 3-rd.
0-th and others not.
Inside my procedure I want to know what are the types on the positions 1, 2,
3. How can I get them?
The example:
somewhere in the code:
typedef tuple < std::string, double, double, double, int, std::string > Foo;
typedef tuple < std::string, long double, long double, long double, long ,
std::map
Hello,
See http://www.boost.org/libs/tuple/doc/tuple_advanced_interface.html
Basically the metafunction boost::tuples::element
Hi Benjamin Lau wrote:
Hello,
See http://www.boost.org/libs/tuple/doc/tuple_advanced_interface.html
Basically the metafunction boost::tuples::element
::type gives you the type of the N'th element of the tuple type T.
Thanks a lot. I have not seen this link :-). Best regards, -- |\/\/| Seweryn Habdank-Wojewódzki `\/\/'
participants (2)
-
Benjamin Lau
-
Seweryn Habdank-Wojewódzki