On Mon, 12 Aug 2024, 23:52 pifminns deettnta via Gcc-help, < gcc-help@xxxxxxxxxxx> wrote: > I have just found you implemented constexpr placement new > > https://github.com/gcc-mirror/gcc/commit/afa3a4a52cf91485477e4aaa5f05987ec7ff869d > > https://godbolt.org/z/h7WETe5M3 > Hi Jakub. > I try to allocate memory with operator in constexpr context but it does > not seem the C++ standard allows it. However, std::allocator is not > freestanding based on C++ standard. > > Is that a standard defect? I think void* operator new ( std::size_t< > http://en.cppreference.com/w/cpp/types/size_t> count ); and void operator > delete ( void* ptr ) noexcept; should also be constexpr to allow custom > allocators to work in constexpr context. > > If it is a defect, could you report it to wg21? Thank you > This is the approved design, so not a defect.