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

--- Comment #26 from Antony Polukhin <antoshkka at gmail dot com> ---
> That said, it would be fine to add support for this
> under a non-standards-mode option of some sort of course.

C++14 allows to merge and remove global allocations [expr.new]:

"An implementation is allowed to omit a call to a replaceable global allocation
function (21.6.2.1, 21.6.2.2).
When it does so, the storage is instead provided by the implementation or
provided by extending the allocation
of another new-expression."


Moreover, clang already does the elisions: https://godbolt.org/g/jPGuk6

Reply via email to