Debian Codegraph @

gcc/testsuite/g++.dg/cpp0x/alias-decl-4.C

raw
1 // { dg-do compile { target c++11 } }
2
3 // [temp.alias]/3:
4 // The type-id in an alias template declaration shall not refer
5 // to the alias template being declared. The type produced by an
6 // alias template specialization shall not directly or indirectly
7 // make use of that specialization.
8
9 template <class T> struct A;
10 template <class T> using B = typename A<T>::U; // { dg-error "type" }
11 template <class T> struct A {
12 typedef B<T> U;
13 };
14 B<short> b;