# mpusz/mp-units

The Domain-Correct Quantities and Units Library for C++ — full quantity kind safety, ISO 80000 compliant, C++29 standardization candidate.

Repository: https://github.com/mpusz/mp-units
Canonical: https://ross.abutalabs.com/products/mp-units
Homepage: https://mpusz.github.io/mp-units/
Language: C++
License: MIT
License Family: permissive
Topics: units, dimensional-analysis, quantity-manipulation, cpp20, cpp, library, system-of-units, quantity, units-of-measure, units-of-measurement, dimensions, conan, cmake, physical-quantities, physical-units, cpp23, si, safety, isq, system-of-quantities
Last push: 2026-08-26T00:57:33+00:00

## Health v2 (maintenance only)
Score: 75/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 30, longevity 100
- inputs: {"age_days": 2933, "days_push": 8, "days_rel": 252, "gap_med": 226.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1465, forks 122 (observed 2026-08-28T04:04:48.299067+00:00)

## What it is
mp-units is a modern C++20/23/26 library providing compile-time-safe quantities and units of measurement, built on the ISO 80000 International System of Quantities. It offers dimensional analysis, quantity kind safety, and multiple systems of units, and is a candidate for C++29 standardization.

## Use cases
- prevent unit conversion bugs like mixing meters and feet at compile time
- perform dimensional analysis in physics or engineering simulations
- represent SI and imperial quantities with type safety in C++
- model domain-specific quantities with quantity kind safety
- convert between units of measurement safely in C++ code
- implement scientific computing code with ISO 80000 compliant quantities

## When to choose
- you are writing C++20 or later and need compile-time unit safety
- your project involves physical quantities, engineering, or scientific computing where unit errors are costly
- you want an ISO 80000-compliant, actively maintained units library with Conan/CMake support
- you want to align with the future C++29 standardization effort for quantities and units

## When to avoid
- your project is limited to pre-C++20 compilers
- you need a runtime-only or dynamically typed units solution
- you work in a language other than C++
- you need a minimal header with no build system integration and cannot adopt Conan or CMake

## Facets
- artifact type: library
- maturity: active
- function: math, type-system, developer-tools
- domain: programming-languages, developer-tools, simulation
- platform: cpp, cross-platform
- tags: units-of-measure, dimensional-analysis, physical-quantities, iso-80000, si-units, cpp20, cpp23, compile-time-safety, conan, quantity-manipulation, algorithms, cmake

## Member repositories
- mpusz/mp-units (main) score 75

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:48.299067+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:35:06.487455+00:00, confidence not recorded.
  - readme: https://github.com/mpusz/mp-units (fetched 2026-08-28T04:04:48.299067+00:00, sha ab9118810543)
  - homepage: https://mpusz.github.io/mp-units/ (fetched 2026-08-29T11:43:21.715405+00:00, sha 36c6c3c2e4f9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
