nholthaus/units
Some data may be outdated — see provenance labels.
a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies. observed · 2026-09-23
Health v2 · maintenance only
94/100
- Activity 95
- Release rhythm 90
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 0
- age_days: 3917
- days_rel: 64
- days_push: 32
- n_releases_24m: 14
Adoption not part of the score
1058 stars · 140 forks observed · 2026-09-23
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A compile-time, header-only C++23 dimensional-analysis and unit-conversion library with no dependencies. It represents physical quantities as types, so unit conversions are implicit and resolved at compile time while dimensionally inconsistent expressions fail to compile.
Use cases
- convert between units like meters and feet at compile time
- prevent dimensionally inconsistent calculations in physics code
- write quantities with unit literals like 5.0_m
- do dimensional analysis in C++ scientific or engineering code
- avoid unit-mixing bugs in embedded or robotics software
- compute derived quantities like speed from distance and time with type safety
When to choose
- you write C++ and want type-safe physical quantities with zero runtime conversion overhead
- you need a dependency-free, header-only unit library
- you want unit literals and arithmetic that read like handwritten equations
- you need a wide catalog of units and physical constants
When to avoid
- you need runtime-configurable or user-defined unit systems parsed at runtime
- you work in a language other than C++ or must support pre-C++23 compilers
- you only need simple one-off conversions where a type system is overkill
Facets
library · maturity active
serialization math developer-tools developer-tools simulation cross-platform cpp cross-platform windows units-of-measure dimensional-analysis unit-conversion header-only template-metaprogramming compile-time cpp23 physical-quantities no-dependencies algorithms linux macos
2 sources
- readme: https://github.com/nholthaus/units · fetched 2026-09-23 · 5112071d7afe
- homepage: http://nholthaus.github.io/units/ · fetched 2026-08-29 · f080bcf51fa5
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| nholthaus/units | main | 94 |
For agents
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem