This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 116c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-03-08
(From submission #666.)
Consider:
template <class Head, class... Tail>
struct test {
template <Tail..., Head>
static void make() {} // clang accepts, MSVC rejects
};
int main() {
test<char, int, float>::make<4, 6.f, 'a'>();
}
There is implementation divergence for the treatment of this example. It ought to be allowed.
Suggested resolution:
Change in 13.2 [temp.param] paragraph 14 as follows:
...If aA template-parameter pack of a function templatedeclares a template parameter pack, itshall not be followed by another template-parameter P unless...
that template parameterP is deducible from the parameter-type-list (9.3.4.6 [dcl.fct]) of the function templateor,- P has a default argument (13.10.3 [temp.deduct]), or
- that template parameter pack is also a pack expansion.