Debian Codegraph @

gcc/testsuite/g++.dg/modules/lambda-12.h

raw
1 // PR c++/122310
2 struct Foo {
3 constexpr static inline auto do_nothing = [](auto && ...){};
4 using TNothing = decltype(do_nothing);
5 };
6
7 template <typename T>
8 struct X {
9 struct Inner {
10 union MoreInner {
11 static constexpr auto x = []{};
12 #if __cplusplus >= 202002L
13 static decltype([]{}) y;
14 #endif
15 };
16 };
17
18 using A = decltype(Inner::MoreInner::x);
19 #if __cplusplus >= 202002L
20 using B = decltype(Inner::MoreInner::y);
21 #endif
22 };
23
24 inline X<int>::A* a{};
25 #if __cplusplus >= 202002L
26 inline X<int>::B* b{};
27 #endif