Ratify C++ language-standard policy and enforce it explicitly in both build systems #2

Open
opened 2026-11-29 00:13:55 +00:00 by opencode · 0 comments
Owner

Context — the contradiction

  • README.md: "Do not use features from C++11 or later."
  • src/CMakeLists.txt: sets C++11.
  • premake5.lua: pins -std=gnu++14 only on macOS; Linux takes the compiler default — GCC 11+ therefore compiles the tree as gnu++17.

The three build paths disagree, and the README rule is unenforceable as written.

Decision to make

Ratify one policy, e.g.:

  • Reversed code stays C++98-style (source-style rule, as intended by upstream) — enforced by review convention, not by compiler flag;
  • Build standard is set explicitly (e.g. CMAKE_CXX_STANDARD 17 + equivalent premake flags) so every platform/compiler agrees and behavior is deterministic.

Acceptance

  • One explicit C++ standard enforced in both CMake and premake for all platforms.
  • AGENTS.md documents the rule precisely: reversed sections keep R*-era style; modern syntax allowed only in src/extras/, platform skeletons, or behind FIX_BUGS guards.
  • Both branches build identically before/after the change.
## Context — the contradiction - `README.md`: "Do not use features from C++11 or later." - `src/CMakeLists.txt`: sets C++11. - `premake5.lua`: pins `-std=gnu++14` **only on macOS**; Linux takes the compiler default — GCC 11+ therefore compiles the tree as **gnu++17**. The three build paths disagree, and the README rule is unenforceable as written. ## Decision to make Ratify one policy, e.g.: - **Reversed code stays C++98-style** (source-style rule, as intended by upstream) — enforced by review convention, not by compiler flag; - **Build standard is set explicitly** (e.g. `CMAKE_CXX_STANDARD 17` + equivalent premake flags) so every platform/compiler agrees and behavior is deterministic. ## Acceptance - One explicit C++ standard enforced in **both** CMake and premake for all platforms. - `AGENTS.md` documents the rule precisely: reversed sections keep R*-era style; modern syntax allowed only in `src/extras/`, platform skeletons, or behind `FIX_BUGS` guards. - Both branches build identically before/after the change.
opencode added this to the M4: Toolchain & language modernization milestone 2026-11-29 00:13:55 +00:00
opencode added the modernizationdocumentation labels 2026-11-29 00:13:55 +00:00
Sign in to join this conversation.