From Jason Turner

[diff.cpp17.basic]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp16vflz9s/{from.md → to.md} +29 -0
tmp/tmp16vflz9s/{from.md → to.md} RENAMED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### [[basic]]: basics <a id="diff.cpp17.basic">[[diff.cpp17.basic]]</a>
2
+
3
+ **Change:** A pseudo-destructor call ends the lifetime of the object to
4
+ which it is applied. **Rationale:** Increase consistency of the language
5
+ model. **Effect on original feature:** Valid ISO C++17 code may be
6
+ ill-formed or have undefined behavior in this International Standard.
7
+
8
+ [*Example 1*:
9
+
10
+ ``` cpp
11
+ int f() {
12
+ int a = 123;
13
+ using T = int;
14
+ a.~T();
15
+ return a; // undefined behavior; previously returned 123
16
+ }
17
+ ```
18
+
19
+ — *end example*]
20
+
21
+ **Change:** Except for the initial release operation, a release sequence
22
+ consists solely of atomic read-modify-write operations. **Rationale:**
23
+ Removal of rarely used and confusing feature. **Effect on original
24
+ feature:** If a `memory_order_release` atomic store is followed by a
25
+ `memory_order_relaxed` store to the same variable by the same thread,
26
+ then reading the latter value with a `memory_order_acquire` load no
27
+ longer provides any “happens before” guarantees, even in the absence of
28
+ intervening stores by another thread.
29
+