https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83614
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2018-01-13
CC| |msebor at gcc dot gnu.org
Ever confirmed|0 |1
Known to fail| |5.4.0, 6.4.0, 7.2.0, 8.0
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed. All recent GCC versions reject the snippet with the error below
(please remember to include compiler output in bug reports about diagnostics --
see https://gcc.gnu.org/bugs for details). Other compilers besides Clang
compile the code (EDG and MSVC).
pr83614.C: In function ‘int main()’:
pr83614.C:18:10: error: no matching function for call to ‘foo(Y<X, int>&)’
foo(y); // error: X does not match A
^
pr83614.C:10:6: note: candidate: ‘template<template<class> class A, class ...
Ts> void foo(Y<A, Ts ...>)’
void foo(Y<A, Ts...> ) { }
^~~
pr83614.C:10:6: note: template argument deduction/substitution failed:
pr83614.C:18:10: note: template argument ‘X’ does not match ‘A’
foo(y); // error: X does not match A
^