
30 Aug
2008
30 Aug
'08
6:02 p.m.
AMDG Hicham Mouline wrote:
Hello,
how can one make variants over mpl sequences with over 20 types? i tried to redefine BOOST_VARIANT_LIMIT_TYPES to 21 for e.g. without success,
The following compiles for me. #include <boost/mpl/range_c.hpp> #include <boost/variant.hpp> #include <boost/mpl/vector/vector50.hpp> #include <boost/mpl/back_inserter.hpp> #include <boost/mpl/copy.hpp> typedef boost::make_variant_over< boost::mpl::copy< boost::mpl::range_c<int, 0, 30>, boost::mpl::back_inserter<boost::mpl::vector0<> > >::type
::type variant_type;
int main() { variant_type v; } In Christ, Steven Watanabe