• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
2 
3 // The example given in the standard (this is rejected for other reasons anyway).
4 template<class T> struct A;
5 template<class T> using B = typename A<T>::U; // expected-error {{no type named 'U' in 'A<T>'}}
6 template<class T> struct A {
7   typedef B<T> U; // expected-note {{in instantiation of template type alias 'B' requested here}}
8 };
9 B<short> b;
10 
11 template<typename T> using U = int;
12 
13 template<typename ...T> void f(U<T> ...xs);
g()14 void g() { f<void,void,void>(1, 2, 3); }
15 
16 // FIXME: This is illegal, but probably only because CWG1044 missed this paragraph.
17 template<typename T> using U = U<T>;
18