Files
2025-10-25 03:02:53 +03:00

34 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[diff.cpp11.basic]
# Annex C (informative) Compatibility [[diff]](./#diff)
## C.5 C++ and ISO C++ 2011 [[diff.cpp11]](diff.cpp11#basic)
### C.5.3 [[basic]](basic "6Basics"): basics [diff.cpp11.basic]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1995)
**Affected subclause:** [[basic.stc.dynamic.deallocation]](basic.stc.dynamic.deallocation)
**Change:** New usual (non-placement) deallocator[.](#1.sentence-1)
**Rationale:** Required for sized deallocation[.](#1.sentence-2)
**Effect on original feature:** Valid C++ 2011 code can declare a global placement allocation function and
deallocation function as follows:void* operator new(std::size_t, std::size_t);void operator delete(void*, std::size_t) noexcept;
In this revision of C++, however, the declaration of operator delete might match a predefined usual (non-placement)operator delete ([[basic.stc.dynamic]](basic.stc.dynamic "6.8.6.5Dynamic storage duration"))[.](#1.sentence-4)
If so, the
program is ill-formed, as it was for class member allocation functions and
deallocation functions ([[expr.new]](expr.new "7.6.2.8New"))[.](#1.sentence-5)