https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83614
Bug ID: 83614
Summary: deduction failure for template-template argument with
trailing template parameter pack
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a short example:
template <typename >
struct X
{ };
template <template <class> class A, typename T>
struct Y
{ };
template <template <class> class A, typename... Ts>
void foo(Y<A, Ts...> ) { }
template <template <class> class A, typename T>
void bar(Y<A, T> ) { }
int main() {
Y<X, int> y;
foo(y); // error: X does not match A
bar(y); // ok
}
The call to 'foo' should be able to deduce Ts... as {int}, but instead
deduction fails and the error message complains about X not matching A (which
it does). The call to 'bar' succeeds.
clang compiles this.