c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / cpp1y / constexpr-98122.C
blob86b8aa9c5dec448d3b554e40069efe6661b608e9
1 // PR c++/98122
2 // { dg-do compile { target c++14 } }
4 union U { int a; };
6 constexpr bool
7 foo ()
9   U f { 42 };
10   constexpr auto m = &U::a;
11   return (f.*m) == 42;
14 static_assert (foo (), "");