__func函数的约定是什么? [英] What are the conventions for __func functions?
本文介绍了__func函数的约定是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在Linux代码中看到了许多名为__foo的函数。双下划线代表什么,什么时候应该使用?
I've seen a bunch of functions in Linux code named __foo. What does the double underscore stand for and when should it be used?
推荐答案
这表示它是保留的标识符。 C ++ 03和C99标准都提到了这一点。
It means it's a reserved identifer. Both C++ 03 and C99 standard mentioned about this.
C99:
7.1 .3保留标识符
7.1.3 Reserved identifiers
- 所有以下划线开头,大写字母或其他下划线开头的标识符始终保留用于任何用途。
- 所有以下划线开头的标识符始终保留为普通和标记名称空间中文件范围的标识符。
C ++ 03:
每个名称都包含双下划线(_ _)或以下划线开头,大写字母(2.11)保留给实现以供任何使用。
Each name that contains a double underscore (_ _) or begins with an underscore followed by an uppercase letter (2.11) is reserved to the implementation for any use.
请参阅:
- What are the rules about using an underscore in a C++ identifier?
- What does a double underscore mean in a variable name in the C language?
- Why do people use __(double underscore) so much in C++
这篇关于__func函数的约定是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文