File: cpp.instructions.md

package info (click to toggle)
saunafs 5.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,820 kB
  • sloc: cpp: 109,287; sh: 18,755; python: 4,737; ansic: 4,023; makefile: 60; awk: 17
file content (22 lines) | stat: -rw-r--r-- 861 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
---
applyTo: '**/*.{c,cc,cpp,h,hpp}'
---

# C/C++ standard

* The C code should be written using C23 standard.
* The C++ code should be written using C++23 standard.

# Header inclusions

* All files should include `common/platform.h` as the first include followed by a new line.
  This header is required for platform-specific definitions and configurations.
* Then all the system and external libraries should be included in a separate group.
* Then all the project-specific headers should be included in a separate group.
* The project-specific headers inclusions are relative to the `src` directory.
  For instance, the header in `src/common/foo.h` should be included as `#include "common/foo.h"`.
* All groups should be sorted alphabetically.

# Code style

* The code style for C and C++ is defined in the file `.clang-format` in the root of the project.