You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: standard/basic-concepts.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -404,7 +404,7 @@ As described in [§7.4](basic-concepts.md#74-members), all members of a base cla
404
404
405
405
When a `protected` or `private protected` instance member is accessed outside the program text of the class in which it is declared, and when a `protected internal` instance member is accessed outside the program text of the program in which it is declared, the access shall take place within a class declaration that derives from the class in which it is declared. Furthermore, the access is required to take place *through* an instance of that derived class type or a class type constructed from it. This restriction prevents one derived class from accessing protected members of other derived classes, even when the members are inherited from the same base class. Instance interface members defined with `protected` or `private protected` access cannot be accessed from a `class` or `struct` that implements that interface; thesecanbeaccessedonlyfromderivedinterfaces. However, `class` and `struct` types can implement `protected` instance members declared in an interface they implement.
406
406
407
-
Let `B` be a base classthat declares a protected instance member `M`, and let `D` be a class that derives from `B`. Within the *class_body* of `D`, access to `M` can take one of the following forms:
407
+
Let `B` be a base classthat declares a protected instance member `M`, and let `D` be a class that derives from `B`. Within the *class_body* (or *record_class_body*) of `D`, access to `M` can take one of the following forms:
408
408
409
409
- Anunqualified *type_name* or *primary_expression* oftheform `M`.
410
410
- A *primary_expression* oftheform `E.M`, providedthetypeof `E` is `T` oraclassderivedfrom `T`, where `T` is the class `D`, or a class type constructed from `D`.
@@ -606,15 +606,14 @@ The ***scope*** of a name is the region of program text within which it is possi
0 commit comments