50 lines
1.6 KiB
Markdown
50 lines
1.6 KiB
Markdown
[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 "7 Expressions"): 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.8 New [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)
|