Answer the question
In order to leave comments, you need to log in
Explicit hiding (hide) of a base class function in C++
Is there a way in C++ to explicitly state that I want to hide a base class function? More precisely, I need to guarantee a compile-time error if the function I want to hide is virtual.
In other words, you need a specifier that is the opposite of override -- or something with similar semantics. In C#, the new specifier is used for this.
If there is no solution in the current standard, then maybe there are some GCC extensions? And in general, where can I read some official discussions of future changes to the standard;
Or maybe a similar feature is planned ... I also asked a question on StackOverflow. Silent...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question