Any way to make a base class's const methods public and non-const methods
private?
For example, I have a class subclassing a vector
class A : private vector<int>
{
};
This make all methods in vector private in class A. I'd like to make the
const methods in vector, like size(), public; and non-const methods, like
push_back(), private. How to implement it?
No comments:
Post a Comment