|
Boost : |
Subject: Re: [boost] C++11 Metaprogramming
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2012-04-03 09:23:39
On 04/03/2012 01:14 PM, Dave Abrahams wrote:
> I don't understand what you mean by "them" in "expand them."
I meant template parameter packs.
> Argument
> packs can certainly be expanded in arguments to non-variadic templates.
> For example,
>
> template<class...Ts> struct vector {};
> template<class Sequence> struct non_variadic {};
> template<class...Ts> struct foo : non_variadic<vector<Ts...> > {};
>
> But I'm sure you knew that already. The inability to handle argument
> packs directly without wrapping them in something like vector is a real
> limitation, though.
I meant the inability to do
template<class T0 = void, class T1 = void, class T2 = void>
struct mpl_vector {};
template<class... T>
struct c11_vector : mpl_vector<T...> {};
But apparently, this is now allowed.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk