brintos

brintos / llvm-project-archived public Read only

0
0
Text · 696 B · 1e820e4 Raw
24 lines · cpp
1// RUN: %clang_cc1 -std=c++1y -verify %s2// expected-no-diagnostics3 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*>];24