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

50 lines
1.6 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.cpp14.expr]
# Annex C (informative) Compatibility [[diff]](./#diff)
## C.4 C++ and ISO C++ 2014 [[diff.cpp14]](diff.cpp14#expr)
### C.4.3 [[expr]](expr "7Expressions"): expressions [diff.cpp14.expr]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1638)
**Affected subclauses:** [[expr.post.incr]](expr.post.incr) and [[expr.pre.incr]](expr.pre.incr)
**Change:** Remove increment operator with bool operand[.](#1.sentence-1)
**Rationale:** Obsolete feature with occasionally surprising semantics[.](#1.sentence-2)
**Effect on original feature:** A valid C++ 2014 expression utilizing the increment operator on
a bool lvalue is ill-formed in this revision of C++[.](#1.sentence-3)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1647)
**Affected subclauses:** [[expr.new]](expr.new) and [[expr.delete]](expr.delete)
**Change:** Dynamic allocation mechanism for over-aligned types[.](#2.sentence-1)
**Rationale:** Simplify use of over-aligned types[.](#2.sentence-2)
**Effect on original feature:** In C++ 2014 code that uses a [*new-expression*](expr.new#nt:new-expression "7.6.2.8New[expr.new]") to allocate an object with an over-aligned class type,
where that class has no allocation functions of its own,::operator new(std::size_t) is used to allocate the memory[.](#2.sentence-3)
In this revision of C++,::operator new(std::size_t, std::align_val_t) is used instead[.](#2.sentence-4)