Boost logo

Boost Users :

Subject: Re: [Boost-users] MPL. Difference between variadic and numbered forms of sequences
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-02-19 12:11:47


AMDG

dilas dilas wrote:
> When I write expressions like:
>
> template<class Seq, class Elem> struct pairs: fold<Seq, vector<>, push_back<_1,vector2<Elem, _2 > > >{};
>
> Everything works just fine, but when I use variadic form:
>
> template<class Seq, class Elem> struct pairs: fold<Seq, vector<>, push_back<_1,vector<Elem, _2 > > >{};
>
> I have a lot of errors. Can someone explain me what's the difference?

MPL lambdas only work with templates that have up to
five arguments. vector2 has two parameters, so it's okay.
vector has 20 parameters (all of which are defaulted),
so it breaks.

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