blob: 1e820e411ae3ad46a4869e4a3d23516a09068825 [file] [log] [blame]
Richard Smith10b55fc2013-09-26 03:49:48 +00001// RUN: %clang_cc1 -std=c++1y -verify %s
2// expected-no-diagnostics
3
4template<typename T> struct A {
5 template<typename U> struct B;
6 template<typename U> struct B<U*>;
7};
8template<typename T> template<typename U> struct A<T>::B<U*> {};
9template struct A<int>;
10A<int>::B<int*> b;
11
12
13template<typename T> struct B {
14 template<typename U> static const int var1;
15 template<typename U> static const int var1<U*>;
16
17 template<typename U> static const int var2;
18};
19template<typename T> template<typename U> const int B<T>::var1<U*> = 1;
20template<typename T> template<typename U> const int B<T>::var2<U*> = 1;
21template struct B<int>;
22int b_test1[B<int>::var1<int*>];
23int b_test2[B<int>::var2<int*>];