Let\'s say I have the following class X where I want to return access to an internal member:
class X
class Z { // details }; class X { std::vec
Typically, the member functions for which you need const and non-const versions are getters and setters. Most of the time they are one-liners so code duplication is not an issue.