💾 Archived View for vostok.any-key.press › capsule › coding_style.gmi captured on 2024-08-24 at 23:39:28. Gemini links have been rewritten to link to archived content
View Raw
More Information
⬅️ Previous capture (2024-05-10)
-=-=-=-=-=-=-
vostok C++ coding style
C++ Core Guidelines
Files
- <snake_case>.cc
- <snake_case>.h
Names
Styles:
- CamelCase for class, struct and enum;
- snake_case for namespace, variable, function and method;
- SCREAMING_CASE for constants.
Prefixes:
- Use "m_" prefix for private members of class ;
- Use "s_" prefix for static members of class;
- Use "g_" prefix for global variables.
class or struct
struct:
- data members can vary independently;
- all members are public;
- does not contain methods.
class:
- has an invariant;
- all members are private.