Google C++ Style Guide 翻阅笔记 2

Google C++ Style Guide 阅读笔记 2

Inline Functions

  • 10行以上的函数不要内联。
  • 可以使用编译器自动内联。

Function Parameter Ordering

  • 参数顺序: 输入, 输出
  • 输入通常是值或者常量引用

Names and Order of Includes

  • 举例,在dir/foo.h 中:
    1. dir/foo.h
    2. C system files
    3. C++ system files
    4. Other libraries .h files
    5. Your project’s .h files