Debian Codegraph @

gcc/testsuite/g++.dg/modules/decltype-1_a.C

raw
1 // PR c++/105322
2 // { dg-module-do link }
3 // { dg-additional-options -fmodules-ts }
4 // { dg-module-cmi pr105322.Decltype }
5
6 export module pr105322.Decltype;
7
8 auto f() {
9 struct A { int m;
10 int get () { return m; }
11 };
12 return A{};
13 }
14
15 export
16 inline void g1() {
17 auto r = decltype(f()){0};
18 }
19
20 export
21 inline void g2() {
22 auto r = f().m;
23 }
24
25 export
26 inline void g3() {
27 auto r = f().get();
28 }