1 // Testcase from P0127R2 2 // { dg-do compile { target c++17 } } 3 4 template <long n> struct A { }; 5 6 template <class T> struct C; 7 template <class T, T n> struct C<A<n>> 8 { 9 using Q = T; 10 }; 11 12 typedef long R; 13 typedef C<A<2>>::Q R; // OK; T was deduced to long from the template argument value in the type A<2> 14