[ISO/IEC 14882:2014]A member of a class can be

• private: that is, its name can be used only by members and friends of the class in which it is declared.
• protected: that is, its name can be used only by members and friends of the class in which it is declared, by classes derived from that class, and by their friends (see 11.4).
• public: that is, its name can be used anywhere without access restriction.

[ISO/IEC 14882:2014]It should be noted that it is access to members and base classes that is controlled, not their visibility.

[TC++PL4th]A compiler may reorder sections of a class with separate access specifiers.