UNITS v2.3.0 Release Notes
Release Date: 2017-09-16 // about 6 years ago-
๐ features:
- 5x compile time improvement on MSVC.
- 1.5x compile time improvement on GCC.
- 0๏ธโฃ Even more dramatic reductions in compile time can be acheived if you opt-in to specific unit definitions instead of using all the library-defined types (which is the default value). Check out Enabling a subset of units to improve compilation time for instructions.
- โ Adds std::cout support for units with no defined abbreviation (they show up as a combination of SI base units)
- ๐ Support for
std::numeric_limits
of unit types. - Assignment operators for unit types:
-=
,+=
,/=
,*=
. - โ Added
min
andmax
overloads for units types inunits::math
. โ Added
to_string
function andabbreviation
functions:auto len = 3.5_m;auto str = units::length::to_string(len);auto abv = units::length::abbreviation(len); std::cout << str; // prints "3.5 m"std::cout << abv; // prints "m"
Added units of data and data transfer:
bits
,bytes
,bits_per_second
, andbytes_per_second
.โ Adds
value()
member for accessing underlying type.Adds
value_type
trait, as a synonym forunderlying_type
.โ Adds definitions for Julian and Gregorian years.
๐ฆ Thanks to @dinocore1,
units
now supports cmake install andfind_packages
. From the pull request:To have cmake install units library to a local 'install' directory:mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX="install" .. cmake --build . --target install# The units library can then be used in some other cmake project using # the standard 'find_package' command. Like so:find_package(units)
๐ Bug fixes:
- ๐ Fixed singualr name of
siemen
to besiemens
(Thanks @Oxyd) - ๐ Fixed bug with
cubrt
operation (Thanks @PearCoding) - ๐ fixed constexpr relational operators bug
- ๐ fixed exponential temperature conversions (Thanks @guarndt)