Title
Non-deduced non-final parameter packs
Status
c++11
Section
13.2 [temp.param]
Submitter
John Spicer

Created on 2011-02-23.00:00:00 last changed 96 months ago

Messages

Date: 2011-03-15.00:00:00

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

Date: 2011-04-10.00:00:00

According to 13.2 [temp.param] paragraph 11,

If a template-parameter of a class 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 is a template parameter pack, it shall be the last template-parameter. [Note: These are not requirements for function templates or class template partial specializations because template arguments can be deduced (13.10.3 [temp.deduct])...

Should the Standard forbid non-final parameter packs in cases where the declaration does not allow the template arguments to be deduced? For example,

    template<typename... T, typename... U> void f() { }
    template<typename... T, typename U> void g() { }

(See also issue 549.)

History
Date User Action Args
2014-03-03 00:00:00adminsetstatus: fdis -> c++11
2011-04-10 00:00:00adminsetmessages: + msg3380
2011-04-10 00:00:00adminsetstatus: open -> fdis
2011-02-23 00:00:00admincreate