class MyClass // Depending on the case, the solution might be different. Here, since this class does not enforce any invariant, we make all the data members public
Since ``++const++`` data members cannot be modified, it's not breaking encapsulation to make a const value public, even in a class that enforces an invariant.
* https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#c134-ensure-all-non-const-data-members-have-the-same-access-level[{cpp} Core Guidelines C.134]: Ensure all non-const data members have the same access level
* https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#c9-minimize-exposure-of-members[{cpp} Core Guidelines C.9]: Minimize exposure of members