]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CXX/temp/temp.decls/temp.alias/p3.cpp
Vendor import of clang release_30 branch r142614:
[FreeBSD/FreeBSD.git] / test / CXX / temp / temp.decls / temp.alias / p3.cpp
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 // FIXME: This is illegal, but probably only because CWG1044 missed this paragraph.
13 template<typename T> using U = U<T>;