UNITS v2.3.0 Release Notes

Release Date: 2017-09-16 // over 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 and max overloads for units types in units::math.
    • โž• Added 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"

    • Added units of data and data transfer: bits, bytes, bits_per_second, and bytes_per_second.

    • โž• Adds value() member for accessing underlying type.

    • Adds value_type trait, as a synonym for underlying_type.

    • โž• Adds definitions for Julian and Gregorian years.

    • ๐Ÿ“ฆ Thanks to @dinocore1, 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:

    • ๐Ÿ›  Fixed singualr name of siemen to be siemens (Thanks @Oxyd)
    • ๐Ÿ›  Fixed bug with cubrt operation (Thanks @PearCoding)
    • ๐Ÿ›  fixed constexpr relational operators bug
    • ๐Ÿ›  fixed exponential temperature conversions (Thanks @guarndt)