Update 'Coding guidelines'

master
Emil Jarosz 4 lat temu
rodzic
commit
e2d67a9b4a
1 zmienionych plików z 27 dodań i 1 usunięć
  1. +27
    -1
      Coding-guidelines.md

+ 27
- 1
Coding-guidelines.md

@ -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>
```

Ładowanie…
Anuluj
Zapisz