diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/modules/lambda-12.h')
| -rw-r--r-- | gcc/testsuite/g++.dg/modules/lambda-12.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/modules/lambda-12.h b/gcc/testsuite/g++.dg/modules/lambda-12.h new file mode 100644 index 00000000000..4dd329d4760 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/lambda-12.h @@ -0,0 +1,27 @@ +// PR c++/122310 +struct Foo { + constexpr static inline auto do_nothing = [](auto && ...){}; + using TNothing = decltype(do_nothing); +}; + +template <typename T> +struct X { + struct Inner { + union MoreInner { + static constexpr auto x = []{}; +#if __cplusplus >= 202002L + static decltype([]{}) y; +#endif + }; + }; + + using A = decltype(Inner::MoreInner::x); +#if __cplusplus >= 202002L + using B = decltype(Inner::MoreInner::y); +#endif +}; + +inline X<int>::A* a{}; +#if __cplusplus >= 202002L +inline X<int>::B* b{}; +#endif |
