Richard Smith | 10b55fc | 2013-09-26 03:49:48 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -std=c++1y -verify %s |
| 2 | // expected-no-diagnostics |
| 3 | |
| 4 | template<typename T> struct A { |
| 5 | template<typename U> struct B; |
| 6 | template<typename U> struct B<U*>; |
| 7 | }; |
| 8 | template<typename T> template<typename U> struct A<T>::B<U*> {}; |
| 9 | template struct A<int>; |
| 10 | A<int>::B<int*> b; |
| 11 | |
| 12 | |
| 13 | template<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 | }; |
| 19 | template<typename T> template<typename U> const int B<T>::var1<U*> = 1; |
| 20 | template<typename T> template<typename U> const int B<T>::var2<U*> = 1; |
| 21 | template struct B<int>; |
| 22 | int b_test1[B<int>::var1<int*>]; |
| 23 | int b_test2[B<int>::var2<int*>]; |