ADR-0001: Adopt Modern C++23 Features
Status
Accepted
Context
Hahaha is positioned as an education-oriented library. To demonstrate state-of-the-art C++ paradigms, we need to decide what C++ standard level the project targets.
Decision
We decided to fully embrace C++23.
Key reasons
- Concepts: compared to
enable_if, Concepts make tensor-template error messages much more human-readable. - stacktrace: built-in stack traces greatly reduce the debugging cost of low-level math libraries.
Consequences
- Compiler requirements: GCC 13+ or Clang 16+ are required.
- Educational value: the codebase becomes a great reference for learning modern C++.
- Risk: older systems may not compile directly; Docker containers may be required.