diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C new file mode 100644 index 0000000..22eda3a --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C @@ -0,0 +1,45 @@ +// PR c++/56323 +// { dg-do compile { target c++11 } } + +struct A { + A(int i); +}; + +typedef A B; + +struct C : B { + using B::B; +}; + +struct D : B { + using B::A; +}; + +C c(0); +D d(0); + +template <class T> +struct E { + typedef T type; +}; + +template <class T> +struct F : E<T>::type { + using E<T>::type::type; // error: E<T>::type is a typedef +}; + +F<A> f(0); + +template <class T> +struct AT +{ + AT(T); +}; + +template <template <class> class T> +struct G : T<int> +{ + using T<int>::T; +}; + +G<AT> g(0); |