diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C new file mode 100644 index 0000000..559fc51 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C @@ -0,0 +1,34 @@ +// { dg-do compile { target c++11 } } + +// alias template of a partial specialization + +template<class T, class U, class W> struct S0 {}; +template<class T, class U> struct S0<T, U, char> {}; +template<class T> using AS0 = S0<T, int, char>; +void foo(S0<bool, int, char>); + +AS0<bool> a; // OK + +void +f() +{ + foo(a); //OK +} + +// alias template of an explicit specialization of a member template + +template<class T> +struct S1 { + template<class U> + struct M {}; +}; +template<class T> using AM = S1<int>::M<T>; +void bar(S1<int>::M<bool>); + +AM<bool> b; //OK. + +void +g() +{ + bar(b); //OK +} |