在C语言中,3种不同的作用域 a、外部链接(External Linkage):如果一个变量在组成一个程序的所有文件中的任何位置都可以被访问,则称该变量支持外部链接。变量用extern修饰。
基于392个网页-相关网页
Direct modification of objects that have external linkage.
直接改变具有外部连接属性的对象。
The templates, classes, functions, and objects in the library have external linkage (3.5).
标准库中的模板,类, 函数和对象具有外部连接(3.5)。
I think that for static functions (or those in an anonymous namespace), the compiler could possibly make the optimization you're talking about, since the function does not have external linkage.
我认为对于静态函数(或者匿名命名空间中的那些),编译器可能会做出你正在谈论的优化,因为函数没有外部链接。
应用推荐