2 // { dg-do compile { target c++20 } }
4 union V { int a; char b; };
5 union W { int a; int b; };
11 constexpr auto m = &V::a;
12 return (f.*m) == 42; // { dg-error "accessing 'V::a' member instead of initialized 'V::b' member in constant expression" }
19 constexpr auto m = &W::b;
23 static_assert (bar (), ""); // { dg-error "non-constant condition for static assertion" }
24 // { dg-message "in .constexpr. expansion" "" { target *-*-* } .-1 }
25 static_assert (baz (), "");