当前位置 博文首页 > 北境の守望者:【C/C++】Google 出品的代码规范(Google C++ Styl

    北境の守望者:【C/C++】Google 出品的代码规范(Google C++ Styl

    作者:[db:作者] 时间:2021-07-26 14:51

    文章目录

    • I. 开篇, 一图胜千言
    • II. 分门别类, 娓娓道来
      • Principles 原则
      • Header Files 头文件
        • Self-contained Headers
        • The #define Guard #define 保护
        • Forward Declarations 前置声明
        • Inline Functions 内联函数
        • Names and Order of Includes
      • Scope 域
        • Namespaces 命名空间
        • Nonmember, Static Member, and Global Functions
        • Local Variables
        • Static and Global Variables
      • Classes 类
        • Doing Work in Constructors
        • Implicit Conversions
        • Copyable and Movable Types
        • Structs vs. Classes
        • Inheritance
        • Operator Overloading
        • Access Control
        • Declaration Order
      • Functions 函数
        • Output Parameters
        • Write Short Functions
        • Reference Arguments
        • Function Overloading
        • Default Arguments
        • Trailing Return Type Syntax
      • Google-Specific Magic
        • Ownership and Smart Pointers
        • cpplint
      • Other C++ Features
        • Rvalue References
        • Friends
        • Exceptions
        • noexcept
        • Run-Time Type Information(RTTI)
        • Casting
        • Streams
        • Preincrement and Predecrement
        • Use of const
        • Use of constexpr
        • Integer Types
        • 64-bit Portabaility
        • Preprocessor Macros
        • 0 and nullptr/NULL
        • sizeof
        • auto
        • Braced Initializer List
        • Lambda Expressions
        • Template metaprogramming
        • Boost
        • std::hash
        • C++ 11
        • Nonstandard Extensions
        • Aliases
      • Naming 命名
        • 命名风格
        • 一般规则
        • File Names
        • Type Names
        • Variable Names
        • Class Data Members
        • Struct Data Members
        • Function Names
        • Namespace Names
        • Macro Names
        • Enumerator Names
        • Exceptions to Naming Rules
      • Comments 注释
        • 注释风格
        • 文件注释
        • 类注释
        • 函数注释
          • 函数声明 declaration
          • 函数实现 implementation
          • 函数体 body
          • 函数参数 parameters
        • TODO 注释
      • Formatting
        • Line Length
        • Non-ASCII Characters
        • Spaces vs. Tabs
        • Function Declarations and Definitions
        • Lambda Expressions
        • Function Calls
        • Braced Initializer List Format
        • Conditionals
        • Loops and Switch Statements
        • Pointer and Reference Expresions
        • Boolean Expressions
        • Return Values
        • Variable and Array Initialization
        • Preprocessor Directives
        • Class Format
        • Constructor Initializer Lists
        • Namespace Formatting
        • Horizontal Whitespace
        • Vertical Whitespace
      • Exceptions to the Rules
        • Existing Non-conformant Code
        • Windows Code
      • Parting Words : Use common sense and BE CONSISTENT
    • III. 专题深入, 积沙成塔
    • Ref
    cs
    下一篇:没有了