调用它的额外成本应该为零,因为 derived classes(派生类)的 inverts 使用 inline functions(内联函数)调用 base class(基类)的版本。(这个 inline 是隐式的——参见《理解inline化的介入和排除》。
基于82个网页-相关网页
...为啥用内联函数(inline functions) 在C++中函数调用需要建立栈环境,进行参数复制,保护调用现场,返回时进行返回值复制,恢复调用现场.这些操作都需要额外开销.
基于4个网页-相关网页
Function literals & inline functions 函数字面量和内联函数
Inline functions to the rescue 用于救援的内联函数
Inline table-valued functions 内联表值型函数 ; 创建内联表值型用户自定义函数 ; 内嵌表值型函数 ; 内嵌表值函数
Inline named functions 内部实名函数
This section tells you how to create C++ inline functions from a UML model.
本小节向您介绍如何从一个 UML 模型中创建 C++ 内联函数。
It provides the best readability with inline functions and complex structures.
且它让内联函数和混合结构具有最好的可读性。
With WPO, the compiler can inline functions from any source file in the program.
有了WPO,编译器就可以从程序中的所有源文件内联函数。
应用推荐