inline(读书笔记)
来源:互联网 发布:怎么样联系网络推手 编辑:程序博客网 时间:2024/05/21 09:27
inline is a new characteristic in the C++ language. The compiler will check the type of it, if there is not error, the code of the inline function will be put where it is invoked. While the #define macro is processed by the preprocessor, which would not check the type.
There two restriction:
1, The inline fuction is too complex, e.g. has loop setences.
2, The function address is needed explicitly or inexplicitly.
In this case, the complier will drop the inline, and treat as the common function.
The inline function is often defined in the head file, and is treated as static function in those files which inlude this head file, make it local to avoid re-defined errors.
There two restriction:
1, The inline fuction is too complex, e.g. has loop setences.
2, The function address is needed explicitly or inexplicitly.
In this case, the complier will drop the inline, and treat as the common function.
The inline function is often defined in the head file, and is treated as static function in those files which inlude this head file, make it local to avoid re-defined errors.
- inline(读书笔记)
- Effective C++读书笔记---透彻了解Inline函数
- C++编程思想读书笔记--之内联函数(inline)
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- inline
- 返回指针时应注意
- 万能讲话稿
- 基本确认‘汉芯一号’造假属实
- 20世纪10个最伟大的算法
- 正则表达式的一些用法
- inline(读书笔记)
- 现在回过头来看看两年前的想法
- Implement of Asynchronous Communication between ADSP2106x Series DSP and PC
- 基类指针与派生类指针的相互转换
- Photoshop 中利用钢笔路径抠图
- 虚函数,静态联编与动态联编(读书笔记)
- 血型和人犯最终结局的关系
- Photoshop 小技巧集锦八十条
- ADO.NET学习记录