This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/50830] [c++0x] Variadic template, inner class error


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50830

--- Comment #6 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2011-10-23 09:51:44 UTC ---
[I assume you refer to p8 and the sentence: "If an argument is a pack expansion
(14.5.3), it shall be the last argument in the template argument list."]

No. list_templates<F...> is not an argument that *is* a pack expansion (but it
contains a pack expansion, which is fine). This sentence describes a situation
like the following:

template<class>
struct P;

template<class...>
struct X;

template<class... Ts, class T>
struct X<Ts..., P<T>> {};

This is ill-formed because the expansion Ts... is not at the end of the
argument list.

Changing it to

template<class... Ts, class T>
struct X<P<T>, Ts...> {};

would be OK, though.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]