docs: add non-relative includes to coding standard
This commit is contained in:
parent
241d36471d
commit
3a41bff9ea
|
@ -94,6 +94,7 @@ If there are no preconfigured rules for your IDE, you can use one of the existin
|
||||||
- **Includes** :
|
- **Includes** :
|
||||||
- files from the project : `#include "relative/path/to/the/file.h"`
|
- files from the project : `#include "relative/path/to/the/file.h"`
|
||||||
- external files and std : `#include <file.h>`
|
- external files and std : `#include <file.h>`
|
||||||
|
- use includes relative to included directories like `src`, not relative to the current file. Don't do: `#include "../file.h"`
|
||||||
- Only use [primary spellings for operators and tokens](https://en.cppreference.com/w/cpp/language/operator_alternative)
|
- Only use [primary spellings for operators and tokens](https://en.cppreference.com/w/cpp/language/operator_alternative)
|
||||||
- Use auto sparingly. Don't use auto for [fundamental/built-in types](https://en.cppreference.com/w/cpp/language/types) and [fixed width integer types](https://en.cppreference.com/w/cpp/types/integer), except when initializing with a cast to avoid duplicating the type name.
|
- Use auto sparingly. Don't use auto for [fundamental/built-in types](https://en.cppreference.com/w/cpp/language/types) and [fixed width integer types](https://en.cppreference.com/w/cpp/types/integer), except when initializing with a cast to avoid duplicating the type name.
|
||||||
- Examples:
|
- Examples:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user