Debian Codegraph @

gcc/testsuite/g++.dg/modules/internal-10.C

raw
1 // { dg-additional-options "-fmodules -std=c++20" }
2 // { dg-module-cmi !M }
3
4 // These are not TU-local according to the standard,
5 // but we treat as TU-local due to ABI limitations.
6
7 export module M;
8
9 struct A {
10 static inline auto x = []{};
11
12 template <typename T>
13 static inline auto y = []{};
14 };
15
16 struct B {
17 template <typename T>
18 static inline decltype([]{}) x = {}; // { dg-bogus "TU-local" "" { xfail *-*-* } }
19 };
20
21 template <typename T>
22 struct C {
23 template <typename U>
24 static inline decltype([]{}) x = {}; // { dg-bogus "TU-local" "" { xfail *-*-* } }
25 };