Boost logo

Boost :

Subject: Re: [boost] [type_at] Variadic template utility
From: Johannes Schaub (litb) (schaub.johannes_at_[hidden])
Date: 2011-05-27 07:30:18


Mathias Gaunard wrote:

> On 26/05/2011 13:19, Larry Evans wrote:
>> On 05/26/11 04:47, tymofey wrote:
>>>> Robert Jones<robertgbjones_at_[hidden]>
>>>> On Thu, May 26, 2011 at 8:34 AM, tymofey<tymofey_at_[hidden]> wrote:
>>>>
...
> You cannot expand a template parameter pack to instantiate a
> non-variadic template.
>
> Typically, this
>
> template<typename... T>
> struct make_vector
> {
> typedef boost::mpl::vector<T...> type;
> }:
>
> doesn't work.
>
> GCC gives the error:
> sorry, unimplemented: cannot expand 'T ...' into a fixed-length argument
> list
>
> And I believe the standard doesn't require it just because it would be
> difficult to implement in GCC's codebase.

My understanding is that the spec requires this to be well-formed code.
Clang doesn't currently accept it, and I made a PR against it some time ago:
http://llvm.org/bugs/show_bug.cgi?id=9021


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk