https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70248

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Rejecting the test case because of the initialization is a regression.  The
cast is not a reinterpret cast.  GCC gives the same error with a static cast
too:

$ gcc -S -Wall pr70248.C 
pr70248.C:4:24: error: a reinterpret_cast is not a constant expression
 constexpr int A::*bx = static_cast<int(A::*)>(&B::x);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pr70248.C:5:24: error: a reinterpret_cast is not a constant expression
 constexpr int A::*cx = static_cast<int(A::*)>(&C::x);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to