Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp2a
/
constexpr-virtual19.C
blob: cb0d1bed0b122bee825399050c1ae04ba3e9bb10 [
file
] [
log
] [
blame
]
// 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
)
();