(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
cpp1z/
pr99790.C
// PR c++/99790
// { dg-do compile { target c++17 } }

struct A;
struct B { void (*fn) (A *); };
template <typename T>
int foo (const T &);
struct A { int a; static constexpr B b{[] (A *n) { n->*&A::a = 2; }}; };
int a = foo (A::b);