a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
.value()
and .to<>()
behave the same for scaled dimensionless unitsFull Changelog: https://github.com/nholthaus/units/compare/v3.0.0.beta...v3.0.0.beta.2
Fixes mil definition
Various fixes and improvements
Gal
unit of accelerationPost name refactor
Many new features of v3.x implemeneted, including first-class support for integer units
Preview of version 3.0.0 featuring user-defined variadic dimensions.
No documentation updates yet.
This version removes support for the Visual Studio 2013 compiler.
Features:
name()
and abbreviation()
member functions, which do not really on string/iostream.++
,--
), as well as unary +
operator.Bug fixs:
features:
std::numeric_limits
of unit types.-=
, +=
, /=
, *=
.min
and max
overloads for units types in units::math
.to_string
function and abbreviation
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"
bits
, bytes
, bits_per_second
, and bytes_per_second
.value()
member for accessing underlying type.value_type
trait, as a synonym for underlying_type
.units
now supports cmake install and find_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:
siemen
to be siemens
(Thanks @Oxyd)cubrt
operation (Thanks @PearCoding)Improvements:
Bug fixes:
Notes: