Boost logo

Boost :

From: David A. Greene (greened_at_[hidden])
Date: 2002-11-30 18:18:53


Is it possible to have an MPL vector of MPL vectors? When I
try this, the compiler (g++ 3.2) complains about an incomplete
type for push_back_traits:

#include <boost/mpl/vector.hpp>
#include <boost/mpl/integral_c.hpp>
#include <boost/mpl/push_back.hpp>

int main(void)
{
   typedef boost::mpl::vector<> vec;

   typedef boost::mpl::push_back<
     vec,
     boost::mpl::vector<char, boost::mpl::integral_c<int, 1> >
>::type vec2;

   return(0);
}

vector_test.cc: In instantiation of `boost::mpl::push_back<main()::vec,
boost::mpl::vector<char, boost::mpl::integral_c<int, 1>,
boost::mpl::void_, boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_, boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_, boost::mpl::void_> >':
vector_test.cc:12: instantiated from here
vector_test.cc:12: base class `
    boost::mpl::push_back_traits<boost::mpl::aux::vector_tag<0>
>::algorithm<main()::vec, boost::mpl::vector<char,
    boost::mpl::integral_c<int, 1>, boost::mpl::void_, boost::mpl::void_,
    boost::mpl::void_, boost::mpl::void_, boost::mpl::void_,
boost::mpl::void_,
    boost::mpl::void_, boost::mpl::void_> >' has incomplete type

This seems like a useful thing to do. Is it really not supported?

                            -Dave

-- 
"Some little people have music in them, but Fats, he was all music,
  and you know how big he was."  --  James P. Johnson

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk