A run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements
Fix some string output issues related to units with various prefixes of meters and seconds, and add a UNITS_CMAKE_PROJECT_NAME
variable to cmake to allow the CMAKE project name to be customized.
UNITS_CMAKE_PROJECT_NAME
#310
A few user suggested tweaks, and support additional unit string conversions supported by the google unit converter. Cleaner output for Hz
and prioritization of SI base units in the to_string operation.
sqrt(degC.pow(2))=degC
#275
quad
unit, and clean up some unit conversion strings involving Hz
#265
to_string
could cause a crash #289
removeUserDefinedUnit
method #273
robi
and qubi
prefixesAdded several math operations for units, restored coverage to 100%, added uncertain constants and cleaner string generation and interpretation around the use of '.' and uncertain measurements, and added support for new SI prefixes.
This release has a number of fixes for specific unit strings, adds some other units and a new unit_conversion_maps
structure to reduce stack usage.
units_conversion_maps.hpp
this reduces the stack usage significantly and clears up some warnings about that on some compilers [#217][],#226
can
to cn
and ca
to match country top level domains #229
if constexpr
warnings on some platforms #227
kg m
#224
This release includes some changes to the CMake builds and Targets. Also includes support for 64 bit base types for units with expanded power support, and support for a custom namespace for better integration with other applications. And additional units for natural gas and particle physics.
-Wshadow
warnings for GCC 4.9 and earlier [#66][]lb
, oz
[#91][]std::abs
usage [#70][]Add a converter command line application and fix a few slow conversion issues and some other fuzz issues that came up recently, add isnormal operation for measurements, better test coverage for fixed_precise_measurement, some additional tests and static analysis checks.
cround_equal
and cround_precice_equals
functions. Also noted that the functions weren't aborting on exact floating point equality so were doing quite a bit of extra calculations. #34
[]
in some circumstances. The fix was to be a little more refined as to which point to not inject the *
and to do it in multiple stages so as to not rely on the partitioner so much. #35
fixed_measurement
and fixed_precise_measurement
had incorrect subtraction operation in a few overloads. #39
is_valid
methods for all measurement types #36
to_string
option to use the internal to_string operations to simplify the measurement and units #37
*
and <base>
as the input unit to convert the measurement to base units. #37
to_string
operation for uncertain_measurements #38
isnormal
operation for measurement types #39
UNITS_CLANG_TIDY
option to run tests with Clang tidy #41
Continued work on cleaning up the library and starting to add main documentation, as well as adding more units and cleaning up string conversions and some additional tests. Additional fuzzing fixes and add a webserver for exploring conversions.
UNITS_HEADER_ONLY
target so it actually works and add some tests for it #23
CMAKE_CXX_STANDARD
option #22
Baseline release before some additional components get added