
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
One name for this is operation is 'cross product'. Another is 'outer product': http://aplwiki.com/LearnApl/AplOperators#Outer_and_inner_products That problem was discussed in this thread: http://thread.gmane.org/gmane.comp.lib.boost.devel/171761 It was also posed as a problem 7-8 here: http://www.boostpro.com/mplbook/ One answer was posted here: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?CPPTM_Answers... HTH. -Larry