Annex C (informative) Compatibility [diff]

C.1 C++ and ISO C++ 2017 [diff.cpp17]

C.1.3 [basic]: basics [diff.cpp17.basic]

Affected subclause: []
Change: A pseudo-destructor call ends the lifetime of the object to which it is applied.

Rationale: Increase consistency of the language model.

Effect on original feature: Valid ISO C++ 2017 code may be ill-formed or have undefined behavior in this revision of C++.
[Example 1: int f() { int a = 123; using T = int; a.~T(); return a; // undefined behavior; previously returned 123 } — end example]
Affected subclause: [intro.races]
Change: Except for the initial release operation, a release sequence consists solely of atomic read-modify-write operations.

Rationale: Removal of rarely used and confusing feature.

Effect on original feature: If a memory_­order_­release atomic store is followed by a memory_­order_­relaxed store to the same variable by the same thread, then reading the latter value with a memory_­order_­acquire load no longer provides any “happens before” guarantees, even in the absence of intervening stores by another thread.