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

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
It's evident that there's a flaw in the standard, making it impossible to
allocate uninitialized memory for freestanding environments. That's precisely
why I reported it as a potential issue for future proposals. Unfortunately,
some individuals, including yourself, mistook my intent for trolling. The truth
is, we can't have features that rely on compiler magic to be implemented by
users; this necessitates reporting it as a Defect Report (DR) to WG21.

While std::addressof still had a workaround via __builtin_addressof, you're
currently left without such an alternative.

Perhaps it would be beneficial for the standard to introduce specialized
functions like constexpr_allocate_at and constexpr_deallocate_at, similar to
construct_at. These functions could offer a constexpr-compatible means of
allocating memory without involving allocators or operator new.


see this issue:

https://github.com/microsoft/STL/issues/4002

Reply via email to