On 01/22/12 08:38, Allan Nielsen wrote:
Hi
If I have two mpl vectors: v1 and v2
typedef boost::mpl::vector
v1; typedef boost::mpl::range_c v2; Does boost then provide any tools for constructing the type:
boost::mpl::vector< boost::mpl::pair< int_<0>, char >, boost::mpl::pair< int_<1>, char >, boost::mpl::pair< int_<2>, char >, boost::mpl::pair< int_<3>, char >,
boost::mpl::pair< int_<0>, short >, boost::mpl::pair< int_<1>, short >, boost::mpl::pair< int_<2>, short >, boost::mpl::pair< int_<3>, short >,
boost::mpl::pair< int_<0>, int >, boost::mpl::pair< int_<1>, int >, boost::mpl::pair< int_<2>, int >, boost::mpl::pair< int_<3>, int >
Best regards Allan W. Nielsen The attached code uses variadic templates and code from:
http://svn.boost.org/svn/boost/sandbox/variadic_templates/boost/mpl/ and does what you want except, instead of mpl::pair, it produces an mpl::vector whose size is the number of mpl sequences on input. HTH. -Larry