Mercurial > hg > CbC > CbC_llvm
comparison clang/test/SemaTemplate/instantiate-partial-spec.cpp @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
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*>]; |