This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50830] [c++0x] Variadic template, inner class error
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 23 Oct 2011 09:51:44 +0000
- Subject: [Bug c++/50830] [c++0x] Variadic template, inner class error
- Auto-submitted: auto-generated
- References: <bug-50830-4@http.gcc.gnu.org/bugzilla/>
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.