# Project Conventions ## Coding Conventions - **Language:** C++23 - **Primitive types:** use fixed-width type aliases (`u32`, `i64`, ...) instead of `std::uint32_t` etc. - **Trailing return type** for function signatures (e.g. `auto fn() -> void`) - **4-space indentation** - **No semicolons after closing braces** for namespaces/classes - `auto` for obvious types (e.g. `auto main(...) -> int`) - **East const** (e.g. `char const*` not `const char*`) - **Trailing return type** for all function definitions, including operators (e.g. `auto operator=(T&&) noexcept -> T&`) - **Public members first** in class declarations, private members at the bottom - **Private data members** start with `m_` (e.g. `m_state`) - `<>` includes only for system headers (std, OS, etc.) - `""` includes for third-party dependencies (e.g. `fmt`, `nlohmann/json`) - **Naming:** `snake_case` for variables, functions, and classes - **Naming:** `SCREAMING_SNAKE_CASE` only for macros and constants - **Header extensions:** C++ headers use `.hpp`, C headers use `.h` - Include order: 1. C++ standard library headers (``, ``, etc.) 2. _(blank line)_ 3. C standard library headers (``, ``, etc.) 4. _(blank line)_ 5. OS-specific headers (Windows API, POSIX, etc.) 6. _(blank line)_ 7. Third-party dependencies (`"fmt/core.h"`, etc.) 8. _(blank line)_ 9. Local/project headers