Skip to content

Releases: nholthaus/units

v2.3.0 RC 1

13 Feb 17:45
Compare
Choose a tag to compare
v2.3.0 RC 1 Pre-release
Pre-release

Release Candidate 1 for v2.3.0

  • Adds data units (bits/bytes) and data transfer units as first-class citizens
  • Adds std::cout support for units with no defined abbreviation (they show up as a combination of SI base units)
  • Adds compound assignment operators: +=, -=, /=, *=.
  • Adds value() member for accessing underlying type.
  • Adds value_type trait, as a synonym for underlying_type.
  • Adds definitions for Julian and Gregorian years.

Notes:

  • Provisionally removes compiler support for MSVC2013.
  • No documentation updates are included in this candidate.

v2.2.0

09 Feb 22:38
Compare
Choose a tag to compare

New Features:

  • Unit types and member functions are now constexpr and noexcept wherever possible.
  • Added cpow<..>(), a constexpr power function.
  • Added make_unit factory function.
  • Added cmath hypot() function.
  • Added optional definition to disable IOStream in embedded applications.

Improvements:

  • New and improved pi constant
  • units::time and std::chrono are now interoperable
  • eliminated warnings on gcc when using -Wall -Wextra -pedantic

v2.1.3

09 Oct 00:00
Compare
Choose a tag to compare

New features:

  • Added a CMake interface project so that units can be more easily included as a git submodule or CMake subdirectory.
  • Added options to disable building unit tests and documentation.

Improvements:

  • Removed all GNU dependencies
  • Updated google test to version 1.8.0 and simplified the build process
  • improved overall units compile time.

v2.1.2

29 Sep 23:47
Compare
Choose a tag to compare

Bug fixes:

  • in-lined the decibel unit literals to prevent multiple definitions.
  • changed inch abbreviation from inch to in

v2.1.1

28 Sep 10:33
Compare
Choose a tag to compare

Enhancements

  • Adds clang support and testing (on linux).

v2.1.0

25 Sep 13:55
Compare
Choose a tag to compare

New features:

  • Literal suffixes for instantiating unit containers (c++14 compliant compiler required).

    auto area = 3.0_m * 4.0_m;    // area == square_meter_t(12.0) ==   12_sq_m;
  • std::cout output now includes the unit abbreviations.

    mile_t distance(26.2);
    std::cout << distance;    // printed: 26.2 mi
  • Unit-to-built-in-type conversions using to<> or unit_cast.

    mile_t distance(26.2);
    double result = unit_cast<double>(distance); // result == 26.2
  • Unit definition macros.

    UNIT_ADD(length, foot, feet, ft, unit<std::ratio<381, 1250>, meters>)
  • Improvements for integral unit types.

Notes:

  • Due to incompatibilites with the WINAPI, the literal abbreviation for tesla units are _Te, instead of the SI standard _T.

Tested on:

  • gcc-4.9.3
  • gcc-5.4.0
  • msvc2013
  • msvc2015

v2.0.3

14 Apr 14:24
Compare
Choose a tag to compare

Added unary minus (-) operator for unit_t types.

v2.0.2

14 Apr 14:11
Compare
Choose a tag to compare

made unit_t types trivial. Default constructed unit_t types are no longer guaranteed to be zero-valued.

v2.0.1

06 Apr 14:31
Compare
Choose a tag to compare

New features:

Supports a wider range of compilers

Tested on:

gcc-4.8.5
gcc-4.9.3
msvc2013
msvc2015

v2.0.0

04 Apr 20:26
Compare
Choose a tag to compare

New features:

Compile-time unit arithmetic via unit_value_t
Unit-enabled ports of most <cmath> functions, including c++11 extensions.
Square-root manipulators for unit, unit_t, and unit_value_t
Improved documentation

Tested on:

gcc -4.9
msvc2015