(root)/
gcc-13.2.0/
gcc/
testsuite/
g++.dg/
cpp2a/
constexpr-virtual19.C
// PR c++/102786
// { dg-do compile { target c++20 } }

struct S {
  virtual constexpr int foo () const { return 42; }
};

constexpr S s;
constexpr auto a = &S::foo;
constexpr auto b = (s.*a) ();
constexpr auto c = (s.*&S::foo) ();