|
Boost Users : |
From: Hicham Mouline (hicham_at_[hidden])
Date: 2008-05-31 15:58:14
This works thank you very much steven,
I am now trying to implement the cartesian product of 3 sequences
based on the earlier post:
template<typename T> struct pair_with : mpl::pair<T,boost::mpl::_> {};
template<typename Sequence1,typename Sequence2, typename Sequence3>
struct sequence_product :
boost::mpl::fold<
Sequence1,
boost::mpl::vector0<>,
boost::mpl::joint_view<
boost::mpl::_1,
boost::mpl::transform<
Sequence2,
pair_with<boost::mpl::_2>
>
>
>
{};
Rds,
-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Steven Watanabe
Sent: 31 May 2008 20:51
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] variant<> number of template arguments
AMDG
Hicham Mouline wrote:
>
> It seems make_variant_over is also limited by BOOST_VARIANT_LIMIT_TYPES.
> This macro is 20 on 2 platforms (linux-i386-gcc-4.1.2-boost-1.34.1 and
> win-i386-vs2005- boost-1.35.0)
>
> <snip>
>
>
> If I add type19, making the mpc vector have 21 types, compilation fails...
>
The limit of variant and the limit of mpl::vector happen to be the same.
For more types, try using the numbered form of mpl vector which can
handle up to 50 arguments.
#include <boost/mpl/vector/vector30.hpp>
typedef boost::mpl::vector21<...> types;
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net