gcc/testsuite/g++.dg/cpp2a/lambda-targ23.C
raw| 1 | // PR c++/123408 |
| 2 | // { dg-do compile { target c++20 } } |
| 3 | |
| 4 | template <typename> constexpr int zero = 0; |
| 5 | template <auto> using int_alias = int; |
| 6 | |
| 7 | template <typename Arg> |
| 8 | using inner = int_alias<[](auto) { return 0; }((Arg)0)>; |
| 9 | |
| 10 | template <typename Arg> |
| 11 | constexpr int outer = [](auto) { return zero<inner<Arg>>; }(0); |
| 12 | |
| 13 | using type = decltype(outer<int>); |
| 14 | using type = const int; |