diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C')
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C new file mode 100644 index 00000000000..8555154c634 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C @@ -0,0 +1,24 @@ +// Origin PR c++/51191 +// { dg-options "-std=c++0x" } + +template< class T > +class ClassTemplate {}; + +template< class T > +struct Metafunction { + typedef T type; +}; + +template< class T > +using TemplateAlias = ClassTemplate< typename Metafunction<T>::type >; + +using Alias = TemplateAlias<int>; + +template< class T > +void f( TemplateAlias<T> ); + +int main() +{ + Alias x; + f( x ); // { dg-error "no matching function for call to|f" } +} |