aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp23/explicit-obj-lambda18.C
blob: d54a93d1de1c9994413042b1e133b7efd42316a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// PR c++/114632
// { dg-do compile { target c++23 } }

struct S {};

auto lambda = [](this auto& self, const int x) /* -> void */ {};

int main()
{
    void (*func)(S&, int) = lambda; // { dg-error "" }
    return 0;
}