c++ | final

C++11的关键字final有两个用途:(1)、禁止虚函数被重写;(2)、禁止基类被继承。

在派生类中,可以同时使用overried和final。

原文地址:https://www.cnblogs.com/shona/p/11297459.html