declare member variable for each type in a typelist

A

ares.lagae

- 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, double> types;" 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,
 
M

mlimber

- 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top