且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

模板类中的内联虚拟方法

更新时间:2022-02-25 01:46:52

对于虚拟方法,内联没有任何实际意义(因为您需要运行时信息来确定用于内联的代码),因此编译器会生成正常"此类代码中的方法,并定期"调用它们.

In case of virtual methods inlining makes no real sense (as you would need runtime information do decide which code to use for inlining), so compilers generate "normal" methods out of such code, and call them "regularly".