How mpusz/mp-units works
Project type and purpose
• This is an open-source, header-only and compiled Modern C++ library (“mp-units”) that provides compile-time dimensional analysis and unit/quantity manipulation.
• It is intended to be used as a dependency in C++20/C++23 projects via CMake and Conan. It also includes examples, tests, and documentation.
File structure
• Top-level components:
• src/ — library implementation, subdivided into core/ (fundamental templates and algorithms) and systems/ (unit definitions for SI, CGS, IEC, etc.).
• example/ — sample applications showing library usage and integration.
• test/ — two test suites: runtime/ (unit tests executed at run-time) and static/ (compile-time tests).
• docs/, mkdocs.yml — documentation source for MkDocs / GitHub Pages.
• cmake/, conanfile.py — build and packaging support modules.
• .github/workflows/ — CI pipelines for build, tests, formatting, static analysis, documentation.
• Configuration files: CMakeLists.txt at root and in subfolders, Conan profile in .gitpod, pre-commit, formatting rules.
README for additional insights
• Confirms the library’s core focus on zero-overhead, type-safe unit arithmetic.
• Mentions integration points (Compiler Explorer, Gitpod), packaging (ConanCenter), and CI statuses.
• Points to API reference, user guide, and blog posts—indicative of heavy documentation.
Final recommendations
• Every major module and its dependencies without over-splitting trivial files.
• Flows: development flow (edit → commit → CI → publish) and consumer flow (Conan install → include → compile).