p3.cpp revision 226399ce18cdcbb1e83af7c5e644bdabb9d4f2f8
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). 4template<class T> struct A; 5template<class T> using B = typename A<T>::U; // expected-error {{no type named 'U' in 'A<T>'}} 6template<class T> struct A { 7 typedef B<T> U; // expected-note {{in instantiation of template type alias 'B' requested here}} 8}; 9B<short> b; 10 11template<typename T> using U = int; 12 13template<typename ...T> void f(U<T> ...xs); 14void g() { f<void,void,void>(1, 2, 3); } 15 16// FIXME: This is illegal, but probably only because CWG1044 missed this paragraph. 17template<typename T> using U = U<T>; 18