style
esc
  • Loading…

ChangelogC++ Style Guide

Conventions for writing, structuring, formatting and shipping modern C++23 that builds clean on MSVC, Clang and GCC.

Each revision is frozen at its own URL, so an agent pointed at /cpp@2026.10/rules.md keeps the same rules until you bump it. The rule changes below are worked out from the revisions themselves. Also as Markdown.

  1. Unreleased

    Live at /cpp, not pinned yet · 194 rules

    Appendix B's .clang-tidy now agrees with the guide, so the guide's own template passes it:

    • Static data members take the s_ prefix (ClassMemberPrefix), as section 5 names them.
    • Lowercase literal suffixes (0.25f) are allowed: readability-uppercase-literal-suffix is off.
    • do { } while (0) is allowed, since the assert macros in appendix D need it: cppcoreguidelines-avoid-do-while is off.
    • Project-prefixed macros (FG_ASSERT, FG_CORE_INFO) pass cppcoreguidelines-macro-usage; unprefixed macros are still reported.

    The template's sources are fixed for the checks that remain: Main.cpp catches exceptions at the boundary, and test-local Timesteps are const rather than constexpr.

    Rule changes since 2026.10

    No rule changes; prose, examples or formatting only.

  2. 2026.10

    Released 2026-10-19 · 194 rules

    The first pinned revision: the text published as rev. 2026.10 before guides were versioned. From this revision on, /cpp@<revision> URLs never change.

    Rules

    Initial revision: 194 rules.