Affected subclause: [basic.scope]
Change: A
struct is a scope in C++, not in C.
For example,
struct X {
struct Y { int a; } b;
};
struct Y c;
is valid in C but not in C++, which would require
X::Y c;. Rationale: Class scope is crucial to C++, and a struct is a class
. Effect on original feature: Change to semantics of well-defined feature
. Difficulty of converting: Semantic transformation
. How widely used: C programs use
struct extremely frequently, but the
change is only noticeable when
struct, enumeration, or enumerator
names are referred to outside the
struct. The latter is probably rare
.