c++ - derived classes 可否重新定义继承而来的private virtual 函数?
ringa_lee
ringa_lee 2017-04-17 11:03:12
0
1
640

来自于effective C++ 条款35。
如果是public继承父类,父类的private函数不是对派生类不可见么?为啥还可以重新定义父类的private virtual函数呢?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
巴扎黑

Private virtual has been called in the parent class. It only needs to be redefined in the subclass, without calling,
For specific usage, please refer to the reading notes here which are explained in detail:
http://www.cppblog.com/tiandejian/arc...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template