https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91369
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jason Merrill from comment #2) > > should we mark them some way and either allow the first > > cxx_fold_indirect_ref or the above code to change their type the first time > > they are stored? > > This would work, but wouldn't distinguish between a new-expression and the > equivalent written by hand. I suppose a flag could make that distinction. Wouldn't user written code have REINTERPRET_CAST_P set on the cast and thus be rejected? Can user call the replaceable new operator directly in constexpr contexts in some valid way?