| 1 |
// P0847R7 |
| 2 |
// { dg-do compile { target c++23 } } |
| 3 |
|
| 4 |
// lambda declaration with xobj parameter |
| 5 |
|
| 6 |
struct S{}; |
| 7 |
|
| 8 |
void test() |
| 9 |
{ |
| 10 |
(void)[](this auto&& self){}; |
| 11 |
(void)[](this auto& self){}; |
| 12 |
(void)[](this auto const& self){}; |
| 13 |
(void)[](this auto self){}; |
| 14 |
|
| 15 |
(void)[](this S&& self){}; |
| 16 |
(void)[](this S& self){}; |
| 17 |
(void)[](this S const& self){}; |
| 18 |
(void)[](this S self){}; |
| 19 |
|
| 20 |
(void)[x = 0](this auto&& self){}; |
| 21 |
(void)[x = 0](this auto& self){}; |
| 22 |
(void)[x = 0](this auto const& self){}; |
| 23 |
(void)[x = 0](this auto self){}; |
| 24 |
} |
| 25 |
|