diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C new file mode 100644 index 0000000..c52ab46 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C @@ -0,0 +1,15 @@ +// { dg-do compile { target c++11 } } + +// These also represent tests for printing alias declarations and +// their instantiations. + +template<class T, class U> struct A0 {}; +template<class T, class U> using AA0 = A0<T, U>; +template<class T> struct AA0<int, T> {}; // { dg-error "specialization" } + +template <class U> using Ptr = U*; +template<class U> struct Ptr<U*> {}; // { dg-error "specialization" } + +struct A { + using A = int;//{ dg-error "nested|has|same name as|class|in which|declared" } +}; |