1 // Origin PR c++/51191 2 // { dg-do compile { target c++11 } } 3 4 template< class T > 5 class ClassTemplate {}; 6 7 template< class T > 8 struct Metafunction { 9 typedef T type; 10 }; 11 12 template< class T > 13 using TemplateAlias = ClassTemplate< typename Metafunction<T>::type >; 14 15 using Alias = TemplateAlias<int>; 16 17 template< class T > 18 void f( TemplateAlias<T> ); 19 main()20int main() 21 { 22 Alias x; 23 f( x ); // { dg-error "no matching function for call to|f" } 24 } 25