Date
2011-04-10.00:00:00
Message id
3260

Content

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.)