|
|
@ -1 +1,27 @@ |
|
|
|
To be added |
|
|
|
# Coding Guidelines
|
|
|
|
## Includes
|
|
|
|
Header file includes shall be grouped by the categories below, with includes within each group being sorted alphabetically, and with empty lines seperating the groups: |
|
|
|
* The `gp_config` header, if required |
|
|
|
* Headers from the gplib project |
|
|
|
* C++ standard library headers |
|
|
|
* C standard library headers |
|
|
|
|
|
|
|
Headers from the gplib project shall be included using the quote form of the `include` directive. |
|
|
|
Headers included conditionally shall be sorted as normal, and have no additional empty lines around them. |
|
|
|
### Example Code
|
|
|
|
```cpp |
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "gp_config.hpp"
|
|
|
|
|
|
|
|
#include "gp/algorithm/foreach.hpp"
|
|
|
|
#ifndef NO_FP_MATH
|
|
|
|
#include "gp/math/fp_math.hpp" |
|
|
|
#endif
|
|
|
|
#include "gp/math/integer_math.hpp"
|
|
|
|
|
|
|
|
#include <atomic>
|
|
|
|
#include <type_traits>
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
``` |