Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/constexpr-98122.C

raw
1 // PR c++/98122
2 // { dg-do compile { target c++14 } }
3
4 union U { int a; };
5
6 constexpr bool
7 foo ()
8 {
9 U f { 42 };
10 constexpr auto m = &U::a;
11 return (f.*m) == 42;
12 }
13
14 static_assert (foo (), "");