tmp/tmpoiq75amf/{from.md → to.md}
RENAMED
|
@@ -1,19 +1,52 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
-
|
| 4 |
**Rationale:** Enable repurposing of deprecated keyword in future
|
| 5 |
revisions of this International Standard. **Effect on original
|
| 6 |
feature:** A valid C++14 declaration utilizing the `register`
|
| 7 |
*storage-class-specifier* is ill-formed in this International Standard.
|
| 8 |
The specifier can simply be removed to retain the original meaning.
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
auto x1{1}; // was std::initializer_list<int>, now int
|
| 17 |
auto x2{1, 2}; // was std::initializer_list<int>, now ill-formed
|
| 18 |
```
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### [[dcl.dcl]]: declarations <a id="diff.cpp14.dcl.dcl">[[diff.cpp14.dcl.dcl]]</a>
|
| 2 |
|
| 3 |
+
**Change:** Removal of `register` *storage-class-specifier*.
|
| 4 |
**Rationale:** Enable repurposing of deprecated keyword in future
|
| 5 |
revisions of this International Standard. **Effect on original
|
| 6 |
feature:** A valid C++14 declaration utilizing the `register`
|
| 7 |
*storage-class-specifier* is ill-formed in this International Standard.
|
| 8 |
The specifier can simply be removed to retain the original meaning.
|
| 9 |
|
| 10 |
+
**Change:** `auto` deduction from *braced-init-list*. **Rationale:**
|
| 11 |
+
More intuitive deduction behavior. **Effect on original feature:** Valid
|
| 12 |
+
C++14 code may fail to compile or may change meaning in this
|
| 13 |
+
International Standard. For example:
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
auto x1{1}; // was std::initializer_list<int>, now int
|
| 17 |
auto x2{1, 2}; // was std::initializer_list<int>, now ill-formed
|
| 18 |
```
|
| 19 |
|
| 20 |
+
**Change:** Make exception specifications be part of the type system.
|
| 21 |
+
**Rationale:** Improve type-safety. **Effect on original feature:**
|
| 22 |
+
Valid C++14 code may fail to compile or change meaning in this
|
| 23 |
+
International Standard. For example:
|
| 24 |
+
|
| 25 |
+
``` cpp
|
| 26 |
+
void g1() noexcept;
|
| 27 |
+
void g2();
|
| 28 |
+
template<class T> int f(T *, T *);
|
| 29 |
+
int x = f(g1, g2); // ill-formed; previously well-formed
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
**Change:** Definition of an aggregate is extended to apply to
|
| 33 |
+
user-defined types with base classes. **Rationale:** To increase
|
| 34 |
+
convenience of aggregate initialization. **Effect on original feature:**
|
| 35 |
+
Valid C++14 code may fail to compile or produce different results in
|
| 36 |
+
this International Standard; initialization from an empty initializer
|
| 37 |
+
list will perform aggregate initialization instead of invoking a default
|
| 38 |
+
constructor for the affected types. For example:
|
| 39 |
+
|
| 40 |
+
``` cpp
|
| 41 |
+
struct derived;
|
| 42 |
+
struct base {
|
| 43 |
+
friend struct derived;
|
| 44 |
+
private:
|
| 45 |
+
base();
|
| 46 |
+
};
|
| 47 |
+
struct derived : base {};
|
| 48 |
+
|
| 49 |
+
derived d1{}; // error; the code was well-formed in C++14{}
|
| 50 |
+
derived d2; // still OK
|
| 51 |
+
```
|
| 52 |
+
|