c++: Improve errors parsing a braced list [PR101232]
[official-gcc.git] / gcc / testsuite / g++.dg / template / static34.C
blob122fffafbcb569971cb45ec01731eb7a550a59a9
1 // PR c++/52688
2 // { dg-do link }
4 template<class T>
5 struct A {
6   static bool test() {
7     static bool value = false;
8     if (value)
9       return false;
10     struct S {
11       S() { value = true; }
12     };
13     static S s;
14     return true;
15   }
18 int main()
20   A<int>::test();