Debian Codegraph @

gcc/testsuite/g++.dg/template/pr39425.C

raw
1 // PR c++/39425
2 // { dg-do compile }
3
4 class a {
5
6 template<unsigned int s>
7 struct _rec {
8 static const char size = _rec< (s >> 1) >::size; // { dg-error "depth" }
9 };
10
11 template<> // { dg-error "explicit" }
12 struct _rec <0> { // { dg-error "too few" }
13 static const char size = 0;
14 };
15
16 static const unsigned int value = _rec < 1 >::size;
17
18 };
19
20 // { dg-prune-output "compilation terminated" }