[Bug libstdc++/102090] Placement-new is not constexpr

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 27 04:00:34 GMT 2021


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I know cppreference is not the standard but from:
https://en.cppreference.com/w/cpp/memory/construct_at

except that construct_at may be used in evaluation of constant expressions.

(In reply to friedkeenan from comment #4)
> I think you're correct. That's really strange, but I guess that's what
> std::construct_at is for? But that also confuses me, how is GCC's
> implementation of std::construct_at working if placement-new isn't
> constexpr:
> https://github.com/gcc-mirror/gcc/blob/
> 16e2427f50c208dfe07d07f18009969502c25dc8/libstdc%2B%2B-v3/include/bits/
> stl_construct.h#L97

Because it is still broken ...


More information about the Gcc-bugs mailing list