Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/constexpr-virtual19.C

raw
1 // PR c++/102786
2 // { dg-do compile { target c++20 } }
3
4 struct S {
5 virtual constexpr int foo () const { return 42; }
6 };
7
8 constexpr S s;
9 constexpr auto a = &S::foo;
10 constexpr auto b = (s.*a) ();
11 constexpr auto c = (s.*&S::foo) ();