From Jason Turner

[diff.cpp14.dcl.dcl]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpq49781gj/{from.md → to.md} +16 -4
tmp/tmpq49781gj/{from.md → to.md} RENAMED
@@ -1,6 +1,6 @@
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 C++. **Effect on original feature:** A valid C++14
6
  declaration utilizing the `register` *storage-class-specifier* is
@@ -8,36 +8,46 @@ ill-formed in this revision of C++. The specifier can simply be removed
8
  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 revision of
13
- C++. 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 revision
23
- of C++. 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 revision of C++; initialization from an empty initializer list will
37
  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;
@@ -48,5 +58,7 @@ struct derived : base {};
48
 
49
  derived d1{}; // error; the code was well-formed in C++14{}
50
  derived d2; // still OK
51
  ```
52
 
 
 
 
1
+ ### [[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 C++. **Effect on original feature:** A valid C++14
6
  declaration utilizing the `register` *storage-class-specifier* is
 
8
  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 revision of
13
+ C++.
14
+
15
+ [*Example 1*:
16
 
17
  ``` cpp
18
  auto x1{1}; // was std::initializer_list<int>, now int
19
  auto x2{1, 2}; // was std::initializer_list<int>, now ill-formed
20
  ```
21
 
22
+ — *end example*]
23
+
24
  **Change:** Make exception specifications be part of the type system.
25
  **Rationale:** Improve type-safety. **Effect on original feature:**
26
  Valid C++14 code may fail to compile or change meaning in this revision
27
+ of C++.
28
+
29
+ [*Example 2*:
30
 
31
  ``` cpp
32
  void g1() noexcept;
33
  void g2();
34
  template<class T> int f(T *, T *);
35
  int x = f(g1, g2); // ill-formed; previously well-formed
36
  ```
37
 
38
+ — *end example*]
39
+
40
  **Change:** Definition of an aggregate is extended to apply to
41
  user-defined types with base classes. **Rationale:** To increase
42
  convenience of aggregate initialization. **Effect on original feature:**
43
  Valid C++14 code may fail to compile or produce different results in
44
  this revision of C++; initialization from an empty initializer list will
45
  perform aggregate initialization instead of invoking a default
46
+ constructor for the affected types.
47
+
48
+ [*Example 3*:
49
 
50
  ``` cpp
51
  struct derived;
52
  struct base {
53
  friend struct derived;
 
58
 
59
  derived d1{}; // error; the code was well-formed in C++14{}
60
  derived d2; // still OK
61
  ```
62
 
63
+ — *end example*]
64
+