By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 1,544 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

declare member variable for each type in a typelist

P: n/a
- 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
Share this Question
Share on Google+
1 Reply


P: n/a
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.