Any number of access specifiers is allowed and no particular order is required. [ Example:
struct S { int a; protected: int b; private: int c; public: int d; };
— end example ]
[ Note: The effect of access control on the order of allocation of data members is described in [class.mem]. — end note ]
When a member is redeclared within its class definition, the access specified at its redeclaration shall be the same as at its initial declaration. [ Example:
struct S { class A; enum E : int; private: class A { }; enum E: int { e0 }; };
— end example ]
[ Note: In a derived class, the lookup of a base class name will find the injected-class-name instead of the name of the base class in the scope in which it was declared. The injected-class-name might be less accessible than the name of the base class in the scope in which it was declared. — end note ]
[ Example:
class A { }; class B : private A { }; class C : public B { A* p; ::A* q; };
— end example ]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4