Skip to content

No labels!

There aren’t any labels for this repository quite yet.

1.1 P2
1.1 P2
Write in ISO Standard C++
1.2 F51
1.2 F51
Where there is a choice, prefer default arguments over overloading
1.3 C45
1.3 C45
Don’t define a default constructor that only initializes data members; use member initializers inste
1.4 C131
1.4 C131
Avoid trivial getters and setters
1.5 ES10
1.5 ES10
Declare one name (only) per declaration
1.6 NR2
1.6 NR2
Don’t insist to have only a single return-statement in a function
2.1 P11
2.1 P11
Encapsulate messy constructs, rather than spreading through the code
2.2 I23
2.2 I23
Keep the number of function arguments low
2.3 I26
2.3 I26
If you want a cross-compiler ABI, use a C-style subset
2.4 C47
2.4 C47
Define and initialize member variables in the order of member declaration
2.5 CP3
2.5 CP3
Minimize explicit sharing of writable data
2.6 T120
2.6 T120
Use template metaprogramming only when you really need to
3.1 I11
3.1 I11
Never transfer ownership by a raw pointer (T*) or reference (T&)
3.2 I3
3.2 I3
Avoid Singletons
3.3 C90
3.3 C90
Rely on constructors and assignment operators, not memset and memcpy
3.4 ES50
3.4 ES50
Don’t cast away const
3.5 E28
3.5 E28
Avoid error handling based on global state (e.g. errno)
3.6 SF7
3.6 SF7
Don’t write using namespace at global scope in a header file
4.1 F21
4.1 F21
To return multiple “out” values, prefer returning a struct or tuple
4.2 Enum3
4.2 Enum3
Prefer enum classes over “plain” enums
4.3 ES5
4.3 ES5
Keep scopes small
4.4 Con5
4.4 Con5
Use constexpr for values that can be computed at compile time
4.5 T1
4.5 T1
Use templates to raise the level of abstraction of code
4.6 T10
4.6 T10
Specify concepts for all template arguments
5.1 P4
5.1 P4
Ideally, a program should be statically type safe
5.2 P10
5.2 P10
Prefer immutable data to mutable data
5.3 I30
5.3 I30
Encapsulate rule violations
5.4 ES22
5.4 ES22
Don't declare a variable until you have a value to initialize it with
5.5 Per7
5.5 Per7
Design to enable optimization
5.6 E6
5.6 E6
Use RAII to prevent leaks