Debian Codegraph @

gcc/testsuite/g++.dg/modules/merge-17.h

raw
1 // PR c++/99426
2
3 inline auto f() {
4 struct A { int m = 42; };
5 return A{};
6 }
7
8 template<class T>
9 auto ft() {
10 decltype(+T()) x;
11 return [&x] { };
12 }
13
14 inline auto g() {
15 enum E { e };
16 return e;
17 }
18
19 template<class T>
20 auto gt() {
21 enum E : T { e };
22 return e;
23 }
24
25 inline auto h0() {
26 struct { int m; } a0;
27 struct { char n; } a1;
28 return a0;
29 }
30
31 inline auto h1() {
32 struct { int m; } a0;
33 struct { char n; } a1;
34 return a1;
35 }
36
37 template<class T>
38 inline auto h0t() {
39 struct { int m; } a0;
40 struct { char n; } a1;
41 return a0;
42 }
43
44 template<class T>
45 inline auto h1t() {
46 struct { int m; } a0;
47 struct { char n; } a1;
48 return a1;
49 }
50
51 using ty1 = decltype(f());
52 using ty2 = decltype(ft<int>());
53 using ty3 = decltype(g());
54 using ty4 = decltype(gt<int>());
55 using ty5 = decltype(h0());
56 using ty6 = decltype(h0t<int>());
57 using ty7 = decltype(h1());
58 using ty8 = decltype(h1t<int>());