Use the provided .clang-format.
The following naming conventions apply:
- Namespace: snake_case
- Macro: SCREAMING_SNAKE_CASE
- Class: PascalCase
- Struct: PascalCase
- Enum: PascalCase
- Enumerator: camelCase
- Typedef: PascalCase
- Union: PascalCase
- Class Member Function: snake_case
- Struct Member Function: snake_case
- Class Member Field: snake_case
- Struct Member Field: snake_case
- Global Function: snake_case
- Global Variable: snake_case
- Parameter: snake_case
- Local Variable: snake_case
- Concept: snake_case
Please use the following pre-/suffixes:
- Enumerator: eEnumerator
- Class/Struct Private Member Field: m_field
- Template type parameter: Type_T
- Template variable parameter: variable_T
- Concept: concept_c
Exceptions:
- By default, write type trait aliases using
_tsuffix andsnake_case. Type trait variables (likestd::is_same_v) should also have the_vsuffix.
Use trailing return type.
Declare everything that is public first!
The order within public/protected/private parts is the following:
- Type Aliases
- Nested Classes
- Friend Classes
- Static Variables
- Variables
- Static Methods
- Constructors / Destructors
- Operators
- Methods
Declare friend classes as private!
Make your code self-documenting!
- Don't make class fields protected. Make a protected getter/setter instead.