Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vil02/ctunits
Compilte-time utilites for dealing with quantities with units
https://github.com/vil02/ctunits
compile-time-checking dimensional-analysis physical-units strongly-typed
Last synced: 2 days ago
JSON representation
Compilte-time utilites for dealing with quantities with units
- Host: GitHub
- URL: https://github.com/vil02/ctunits
- Owner: vil02
- License: mit
- Created: 2022-11-18T17:36:19.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-06T22:12:38.000Z (18 days ago)
- Last Synced: 2025-01-06T23:25:19.691Z (17 days ago)
- Topics: compile-time-checking, dimensional-analysis, physical-units, strongly-typed
- Language: C++
- Homepage:
- Size: 270 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CtUnits
[![ubuntu_build](https://github.com/vil02/CtUnits/actions/workflows/ubuntu_build.yml/badge.svg)](https://github.com/vil02/CtUnits/actions/workflows/ubuntu_build.yml)
[![static_analysis](https://github.com/vil02/CtUnits/actions/workflows/static_analysis.yml/badge.svg)](https://github.com/vil02/CtUnits/actions/workflows/static_analysis.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=vil02_CtUnits&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=vil02_CtUnits)
[![CodeFactor](https://www.codefactor.io/repository/github/vil02/ctunits/badge)](https://www.codefactor.io/repository/github/vil02/ctunits)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/97b689747b6d49f2b223df82529cdd2a)](https://app.codacy.com/gh/vil02/CtUnits/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![codecov](https://codecov.io/github/vil02/CtUnits/branch/master/graph/badge.svg?token=B1LD8I1WYH)](https://codecov.io/github/vil02/CtUnits)Compilte-time utilites for dealing with quantities with units.
Example [`meters_and_inches.cpp`](./examples/meters_and_inches/meters_and_inches.cpp) illustrates the basic usage.The class [`Quantity`](./CtUnits/ctu/Quantity.hpp) allows to represent values with _arbitrary_ long list of units in rational powers.
[`CtUnits`](./CtUnits/) heavily relies on [Boost.Mp11](https://www.boost.org/doc/libs/master/libs/mp11/doc/html/mp11.html).
The [`tests`](./tests/) require [Boost.Test](https://github.com/boostorg/test).[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/vil02/CtUnits)