// Testcase from P0127R2 // { dg-do compile { target c++17 } } template struct A { }; template struct C; template struct C> { using Q = T; }; typedef long R; typedef C>::Q R; // OK; T was deduced to long from the template argument value in the type A<2>