468,268 Members | 1,549 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

declare member variable for each type in a typelist

- I have a typelist and I want to declare a member variable for each
of the types. How can I do that?
E.g. I have the typelist "typedef boost::mpl::vector<int, float>
types;" and I want to declare member variables with type "int" and
"float".

- I have a typelist and I want to declare a variable based on each of
the types types. How can I do that?
E.g. I have the typelist "typedef boost::mpl::vector<int, float>
types;" and I want to declare member variables with type
"std::tr1::function<void(int)>" and "std::tr1::function<void(int)>".

- I have two typelists and I want to declare a variable for each
combination of type of the two lists.
E.g. I have the typelists "typedef boost::mpl::vector<int, long>
types;" and "typedef boost::mpl::vector<float, doubletypes;" and I
want to declare member variables with type "std::pair<int, float>",
"std::pair<int, double>", "std::pair<long, float>", "std::pair<long,
double>".

Best regards,

--
Ares Lagae
Computer Graphics Research Group, Katholieke Universiteit Leuven
http://www.cs.kuleuven.be/~ares/

May 9 '07 #1
1 2457
On May 9, 9:01 am, "ares.la...@gmail.com" <ares.la...@gmail.com>
wrote:
- I have a typelist and I want to declare a member variable for each
of the types. How can I do that?
E.g. I have the typelist "typedef boost::mpl::vector<int, float>
types;" and I want to declare member variables with type "int" and
"float". [snip]
You should ask on the Boost User mailing list.

Cheers! --M

May 9 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Geoff Cox | last post: by
8 posts views Thread by redefined.horizons | last post: by
9 posts views Thread by Alan Isaac | last post: by
13 posts views Thread by Henri.Chinasque | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.