https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105262
Bug ID: 105262 Summary: Consider adding std::__new_allocator::allocate(size_type, nothrow_t) Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- It would be useful to be able to use std::__new_allocator as an abstraction for the nothrow versions of operator new. That way all the logic for choosing whether to use aligned new/delete and whether __builtin_operator_new is available would only be in one place. It could be used in std::basic_stacktrace::_Impl::_M_allocate and in std::get_temporary_buffer. N.B. I proposed this in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0401r0.html#Nothrow.overload.of.allocate..