Open hubert-reinterpretcast opened 8 years ago
When a function parameter pack expands parameter packs of a member function template alongside parameter packs of an enclosing context, the mangling used (namely SUBSTPACK) is insufficient.
Online compiler: http://melpon.org/wandbox/permlink/wza71mJ5R0feCcG5
template struct A; template <typename ...> struct Tup;
template <typename ...T, typename ...U> struct A<Tup<Tup<T ...>, Tup<U ...>>> { template <typename ...TT> void foo(T ( ...fp[])(TT)) { } template <typename ...TT> void foo(U ( ...fp[])(TT)) { } };
int main(void) { A<Tup<Tup, Tup>> a; a.foo(static_cast<short ()(int)>(0)); a.foo(static_cast<wchar_t ()(int)>(0)); }
clang++ -x c++ -std=c++11 -
@llvm/issue-subscribers-clang-codegen
Extended Description
When a function parameter pack expands parameter packs of a member function template alongside parameter packs of an enclosing context, the mangling used (namely SUBSTPACK) is insufficient.
Online compiler: http://melpon.org/wandbox/permlink/wza71mJ5R0feCcG5
SOURCE ():
template struct A;
template <typename ...> struct Tup;
template <typename ...T, typename ...U> struct A<Tup<Tup<T ...>, Tup<U ...>>> { template <typename ...TT> void foo(T ( ...fp[])(TT)) { } template <typename ...TT> void foo(U ( ...fp[])(TT)) { } };
int main(void) { A<Tup<Tup, Tup>> a;
a.foo(static_cast<short ()(int)>(0));
a.foo(static_cast<wchar_t ( )(int)>(0));
}
COMPILER INVOCATION:
clang++ -x c++ -std=c++11 -
ACTUAL OUTPUT: