Codestyle
-
Use C++20, but for the time being with conservative set of features (no modules,
std::format,chronoadditions; full C++17 is OK). -
Indent by two spaces; the sources should contain no tabs.
-
Classes are named using
CamelCase, functions and variables usingsnake_case, constants usually inALL_UPPERCASE. -
Single-line statements usually do not use curly brackets, unless an
elsecould be ambiguous, or the other block ofif-elseis multiline. -
We do not have a strict line-length limit, but the code should target 140 characters per line.
-
Private class members have underscore at the end.
Technical Remarks
-
Multiple header file inclusion is prevented using
#pragma once. -
Every header file should include
common.h. -
The source files should include
common.honly when not included transitively from some header file. -
The include paths should be preferably absolute from the project root.
-
All code must be in the
linpipenamespace. -
Right now we use a single exception type
LinpipeErrorto throw LinPipe errors (of course, library functions throwstdexceptions).