What you do is the shortest and βstandardβ way to do this, but some people prefer this:
class SomeBase { public: bool operator!=(const SomeBaseClass& other); }; class SomeObject: public SomeBase { typedef SomeBase base;
The advantages of this method are that it clarifies the intent, it gives a standard abbreviation for what might be a long base class name, and if your base class changes, you do not need to change every use of the base.
See Using "super" in C ++ for more discussion.
(Personally, I do not care, and I do not recommend this, but I think this is one correct answer to the question.)
source share