Debian Codegraph @

gcc/testsuite/g++.dg/modules/lambda-7_c.C

raw
1 // { dg-module-do run }
2 // { dg-additional-options "-fmodules-ts -fno-module-lazy -Wno-subobject-linkage" }
3
4 import "lambda-7_a.H";
5
6 int main() {
7 S s;
8 if (s.a(10) != 20)
9 __builtin_abort();
10 if (s.b(10) != 30)
11 __builtin_abort();
12 if (s.c(10) != 40)
13 __builtin_abort();
14 if (d(10) != 50)
15 __builtin_abort();
16
17 #if __cplusplus >= 202002L
18 E e;
19 if (e(10) != 60)
20 __builtin_abort();
21 if (e.f(10) != 70)
22 __builtin_abort();
23
24 G<int> g1;
25 if (g1(10) != 80)
26 __builtin_abort();
27 if (g1.h(10) != 90)
28 __builtin_abort();
29
30 G<double> g2;
31 if (g2(10) != 100)
32 __builtin_abort();
33 if (g2.i(10) != 110)
34 __builtin_abort();
35 #endif
36
37 #if __cpp_concepts >= 201907L
38 static_assert(J<char>);
39 static_assert(K<char>);
40 #endif
41 }