+ 2
Can specific function hiding be removed ?
Hi Refer code below: https://code.sololearn.com/cs7akz5edxUF If we remove line using A::display; from class B, one and zero parametric display will result into compile time error. Can i have some mechanism to stop accessing one and not other? I mean i want to remove function hiding for specific function signature. Is it possible?
2 Réponses
+ 2
No you can't. But there is some trick. You can hide specific signuture in derived class making it private.
+ 2
Sounds good