https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107574
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |8.1.0 Known to fail| |7.5.0, 9.1.0 --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- In GCC 7 and before, GCC rejected the code: <source>:5:1: error: non-constant condition for static assertion static_assert((int(B::*))&C::k, ""); }; ^~~~~~~~~~~~~ <source>:5:15: error: a reinterpret_cast is not a constant expression static_assert((int(B::*))&C::k, ""); }; ^~~~~~~~~~~~~