aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C
new file mode 100644
index 0000000..368e5af
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C
@@ -0,0 +1,24 @@
+// Origin PR c++/51191
+// { dg-do compile { target c++11 } }
+
+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" }
+}