aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda1.C
blob: 86e0471eb7f5c016752c28b78f940980de2f1015 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// P0847R7
// { dg-do compile { target c++23 } }

// lambda declaration with xobj parameter

struct S{};

void test()
{
  (void)[](this auto&& self){};
  (void)[](this auto& self){};
  (void)[](this auto const& self){};
  (void)[](this auto self){};

  (void)[](this S&& self){};
  (void)[](this S& self){};
  (void)[](this S const& self){};
  (void)[](this S self){};

  (void)[x = 0](this auto&& self){};
  (void)[x = 0](this auto& self){};
  (void)[x = 0](this auto const& self){};
  (void)[x = 0](this auto self){};
}