Sign in
gnu
/
gcc
/
a6d3012b274f38b20e2a57162106f625746af6c6
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1y
/
constexpr-98122.C
blob: 86b8aa9c5dec448d3b554e40069efe6661b608e9 [
file
] [
log
] [
blame
]
// PR c++/98122
// { dg-do compile { target c++14 } }
union
U
{
int
a
;
};
constexpr
bool
foo
()
{
U f
{
42
};
constexpr
auto
m
=
&
U
::
a
;
return
(
f
.*
m
)
==
42
;
}
static_assert
(
foo
(),
""
);