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++/57765] [C++11] Variadic Template Specialization does not follow the INCITS/ISOâ/IEC 14882-2011 standard


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

--- Comment #2 from AaronNGray <aaronngray.lists at gmail dot com> ---
Interesting ...from the standard, not in braces :-
"A template parameter pack of a function template shall not be followed by
another template parameter unless that template parameter can be deduced or has
a default argument"

The two paragraphs in full :-

14.1 [11] If a template-parameter of a class template or alias template has a
default template-argument, each subsequent template-parameter shall either have
a default template-argument supplied or be a template parameter pack. If a
template-parameter of a primary class template or alias template is a template
parameter pack, it shall be the last template-parameter. A template parameter
pack of a function template shall not be followed by another template parameter
unless that template parameter can be deduced or has a default argument
(14.8.2).

14.1 [15] If a template-parameter is a type-parameter with an ellipsis prior to
its optional identifier or is a parameter-declaration that declares a parameter
pack (8.3.5), then the template-parameter is a template parameter pack
(14.5.3). A template parameter pack that is a parameter-declaration whose type
contains one or more unexpanded parameter packs is a pack expansion. Similarly,
a template parameter pack that is a type-parameter with a
template-parameter-list containing one or more unexpanded parameter packs is a
pack expansion. A template parameter pack that is a pack expansion shall not
expand a parameter pack declared in the same template-parameter-list.


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