diff --git a/CHANGELOG.md b/CHANGELOG.md index 950e3299..4618cc32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,10 @@ # Changelog -## 2.0.5 +## 2.1.0 -* Fixed typos in documentation +* Moved helper function such as `unit_cast` and `unit_with_common_ratio` to own file for easier maintenance +* Moved cross-unit-operations and `epsEqual` to a separate file for easier maintenance +* Rename `epsEqual()` to `eps_equals()` for consitency with naming scheme ## 2.0.4 diff --git a/CMakeLists.txt b/CMakeLists.txt index 90199632..f3dca3c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.12) project( "SI" - VERSION 2.0.5 + VERSION 2.1.0 DESCRIPTION "A header only c++ library that provides type safety and user defined literals for handling pyhsical values defined in the International System of Units." HOMEPAGE_URL "https://github.com/bernedom/SI" diff --git a/include/SI/absorbed_dose.h b/include/SI/absorbed_dose.h index 20cf35b8..efa0b231 100644 --- a/include/SI/absorbed_dose.h +++ b/include/SI/absorbed_dose.h @@ -1,5 +1,5 @@ /** - * This file is part of "SI" version 2.0.5 + * This file is part of "SI" version 2.1.0 * A header only c++ library that provides type safety and user defined literals * for handling pyhsical values defined in the International System of * Units diff --git a/include/SI/acceleration.h b/include/SI/acceleration.h index 13848f95..f3def17a 100644 --- a/include/SI/acceleration.h +++ b/include/SI/acceleration.h @@ -1,5 +1,5 @@ /** - * This file is part of "SI" version 2.0.5 + * This file is part of "SI" version 2.1.0 * A header only c++ library that provides type safety and user defined literals * for handling pyhsical values defined in the International System of * Units diff --git a/include/SI/angle.h b/include/SI/angle.h index f779233a..49412212 100644 --- a/include/SI/angle.h +++ b/include/SI/angle.h @@ -1,5 +1,5 @@ /** - * This file is part of "SI" version 2.0.5 + * This file is part of "SI" version 2.1.0 * A header only c++ library that provides type safety and user defined literals * for handling pyhsical values defined in the International System of * Units diff --git a/include/SI/area.h b/include/SI/area.h index 4897a0cf..a1d2ee58 100644 --- a/include/SI/area.h +++ b/include/SI/area.h @@ -1,5 +1,5 @@ /** - * This file is part of "SI" version 2.0.5 + * This file is part of "SI" version 2.1.0 * A header only c++ library that provides type safety and user defined literals * for handling pyhsical values defined in the International System of * Units diff --git a/include/SI/astronomic.h b/include/SI/astronomic.h index f15f6f4c..792217b1 100644 --- a/include/SI/astronomic.h +++ b/include/SI/astronomic.h @@ -1,5 +1,5 @@ /** - * This file is part of "SI" version 2.0.5 + * This file is part of "SI" version 2.1.0 * A header only c++ library that provides type safety and user defined literals * for handling pyhsical values defined in the International System of * Units diff --git a/include/SI/catalytic_activity.h b/include/SI/catalytic_activity.h index 1567fc98..58ea3035 100644 --- a/include/SI/catalytic_activity.h +++ b/include/SI/catalytic_activity.h @@ -1,5 +1,5 @@ /** - * This file is part of "SI" version 2.0.5 + * This file is part of "SI" version 2.1.0 * A header only c++ library that provides type safety and user defined literals * for handling pyhsical values defined in the International System of * Units diff --git a/include/SI/detail/cross_unit_operations.h b/include/SI/detail/cross_unit_operations.h new file mode 100644 index 00000000..cc531daf --- /dev/null +++ b/include/SI/detail/cross_unit_operations.h @@ -0,0 +1,60 @@ +/** + * This file is part of "SI" version 2.1.0 + * A header only c++ library that provides type safety and user defined literals + * for handling pyhsical values defined in the International System of + * Units + * + * https://github.com/bernedom/SI + * + * SPDX-License-Identifier: MIT + * + **/ +#pragma once + +#include "detail.h" + +namespace SI::detail { +// forward declaration +template +struct unit_t; + +/// divide a value of a certain unit with another value of a possibly +/// different type resulting in a new type, the resulting exponent is +/// specified by resulting unit using a variadic template to simplify usage of +/// implementation the internal type of the result is the internal type of lhs +template