bernedom / SI

A header only C++ library that provides type safety and user defined literals for physical units
https://si.dominikberner.ch/doc/
MIT License
486 stars 40 forks source link

Update README #112

Closed Lecrapouille closed 1 year ago

Lecrapouille commented 1 year ago
A header only c++ library that provides type safety

Could be nice to explicitly say it is C++17 directly on the 1st line (else said on section "building & compat" which is far away).

bernedom commented 1 year ago

You're right the examples does no longer compile since release 2.5.0 which removed some implicit conversions.

At the moment the correct code would be constexpr auto thousand_grams = one_kilogram.as<SI::gram_t<long double>>();

which is not that nice. Will try to fix it

bernedom commented 1 year ago

The issue is fixed in this branch https://github.com/bernedom/SI/tree/feature/add-tests-for-as-conversion which will go in the next release.

bernedom commented 1 year ago

Released with version 2.5.1.