| 1 |
// PR c++/99833 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
|
| 4 |
#include <tuple> |
| 5 |
|
| 6 |
auto f(auto&& x) |
| 7 |
{ |
| 8 |
[&](auto...) { |
| 9 |
auto y = std::tuple{ "what's happening here?", x }; |
| 10 |
if constexpr (auto [_, z] = y; requires { z; }) |
| 11 |
return; |
| 12 |
}(); |
| 13 |
} |
| 14 |
|
| 15 |
int main() |
| 16 |
{ |
| 17 |
f(42); |
| 18 |
} |