From Jason Turner

[diff.basic]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpnlb8wrs7/{from.md → to.md} +16 -6
tmp/tmpnlb8wrs7/{from.md → to.md} RENAMED
@@ -25,16 +25,26 @@ fundamental types and user-defined types. **Effect on original
25
  feature:** Deletion of semantically well-defined feature. Semantic
26
  transformation. In C++, the initializer for one of a set of
27
  mutually-referential file-local objects with static storage duration
28
  must invoke a function call to achieve the initialization. Seldom.
29
 
30
- **Change:** A `struct` is a scope in C++, not in C. **Rationale:** Class
31
- scope is crucial to C++, and a struct is a class. **Effect on original
32
- feature:** Change to semantics of well-defined feature. Semantic
33
- transformation. C programs use `struct` extremely frequently, but the
34
- change is only noticeable when `struct`, enumeration, or enumerator
35
- names are referred to outside the `struct`. The latter is probably rare.
 
 
 
 
 
 
 
 
 
 
36
 
37
  \[also [[dcl.type]]\] **Change:** A name of file scope that is
38
  explicitly declared `const`, and not explicitly declared `extern`, has
39
  internal linkage, while in C it would have external linkage.
40
  **Rationale:** Because const objects may be used as values during
 
25
  feature:** Deletion of semantically well-defined feature. Semantic
26
  transformation. In C++, the initializer for one of a set of
27
  mutually-referential file-local objects with static storage duration
28
  must invoke a function call to achieve the initialization. Seldom.
29
 
30
+ **Change:** A `struct` is a scope in C++, not in C. For example,
31
+
32
+ ``` cpp
33
+ struct X {
34
+ struct Y { int a; } b;
35
+ };
36
+ struct Y c;
37
+ ```
38
+
39
+ is valid in C but not in C++, which would require `X::Y c;`.
40
+ **Rationale:** Class scope is crucial to C++, and a struct is a class.
41
+ **Effect on original feature:** Change to semantics of well-defined
42
+ feature. Semantic transformation. C programs use `struct` extremely
43
+ frequently, but the change is only noticeable when `struct`,
44
+ enumeration, or enumerator names are referred to outside the `struct`.
45
+ The latter is probably rare.
46
 
47
  \[also [[dcl.type]]\] **Change:** A name of file scope that is
48
  explicitly declared `const`, and not explicitly declared `extern`, has
49
  internal linkage, while in C it would have external linkage.
50
  **Rationale:** Because const objects may be used as values during