《Google C++ 编程风格指南》对于头文件的包含顺序

来源:互联网 发布:网络信息安全认证 编辑:程序博客网 时间:2024/06/05 13:24
《Google C++ 编程风格指南》对于头文件的包含顺序C system files.C++ system files.Other libraries' .h files.Your project's .h files.The preferred ordering reduces hiddendependencies. We want every header file to be compilable on its own. Theeasiest way to achieve this is to make sure that every one of them is the first.h file  为了加强可读性和避免隐含依赖,应使用下面的顺序:C标准库、C++标准库、其它库的头文件、你自己工程的头文件
1 0
原创粉丝点击