[prev in list] [next in list] [prev in thread] [next in thread]
List: boost-users
Subject: Re: [Boost-users] extening variant<> types to more than 20
From: Steven Watanabe <watanabesj () gmail ! com>
Date: 2008-08-30 18:02:23
Message-ID: 48B98B2F.5030404 () providere-consulting ! com
[Download RAW message or body]
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
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic