Library updated to the latest cmake common tools

This commit is contained in:
Mateusz Pusz committed 2020-01-31 17:02:27 +01:00
1 parent f2163aa098
commit 645570ff57
20 files changed
+121 -91

No files matched your search

@@ -62,11 +62,11 @@ namespace units {
// exp
template<const base_dimension& BaseDimension, int Num, int Den = 1>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den = 1>
struct exp {
static constexpr const base_dimension& dimension = BaseDimension;
static constexpr int num = Num;
static constexpr int den = Den;
static constexpr std::intmax_t num = Num;
static constexpr std::intmax_t den = Den;
};
// is_exp
@@ -74,7 +74,7 @@ namespace units {
template<typename T>
inline constexpr bool is_exp = false;
template<const base_dimension& BaseDimension, int Num, int Den>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den>
inline constexpr bool is_exp<exp<BaseDimension, Num, Den>> = true;
} // namespace detail
@@ -92,7 +92,7 @@ namespace units {
template<Exponent E>
struct exp_invert;
template<const base_dimension& BaseDimension, int Num, int Den>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den>
struct exp_invert<exp<BaseDimension, Num, Den>> {
using type = exp<BaseDimension, -Num, Den>;
};
@@ -160,7 +160,7 @@ namespace units {
using type = conditional<std::is_same_v<rest, dimension<>>, dimension<E1>, type_list_push_front<rest, E1>>;
};
template<const base_dimension& D, int Num1, int Den1, int Num2, int Den2, Exponent... ERest>
template<const base_dimension& D, std::intmax_t Num1, std::intmax_t Den1, std::intmax_t Num2, std::intmax_t Den2, Exponent... ERest>
struct dim_consolidate<dimension<exp<D, Num1, Den1>, exp<D, Num2, Den2>, ERest...>> {
using r1 = std::ratio<Num1, Den1>;
using r2 = std::ratio<Num2, Den2>;
@@ -62,7 +62,7 @@ namespace units {
// exp
template<const base_dimension& BaseDimension, int Num, int Den = 1>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den = 1>
struct exp {
static constexpr const base_dimension& dimension = BaseDimension;
static constexpr int num = Num;
@@ -74,7 +74,7 @@ namespace units {
template<typename T>
inline constexpr bool is_exp = false;
template<const base_dimension& BaseDimension, int Num, int Den>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den>
inline constexpr bool is_exp<exp<BaseDimension, Num, Den>> = true;
} // namespace detail
@@ -92,7 +92,7 @@ namespace units {
template<Exponent E>
struct exp_invert;
template<const base_dimension& BaseDimension, int Num, int Den>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den>
struct exp_invert<exp<BaseDimension, Num, Den>> {
using type = exp<BaseDimension, -Num, Den>;
};
@@ -160,7 +160,7 @@ namespace units {
using type = conditional<std::is_same_v<rest, dimension<>>, dimension<E1>, type_list_push_front<rest, E1>>;
};
template<const base_dimension& D, int Num1, int Den1, int Num2, int Den2, typename... ERest>
template<const base_dimension& D, std::intmax_t Num1, std::intmax_t Den1, std::intmax_t Num2, std::intmax_t Den2, typename... ERest>
struct dim_consolidate<dimension<exp<D, Num1, Den1>, exp<D, Num2, Den2>, ERest...>> {
using r1 = std::ratio<Num1, Den1>;
using r2 = std::ratio<Num2, Den2>;
@@ -62,11 +62,11 @@ namespace units {
// exp
template<const base_dimension& BaseDimension, int Num, int Den = 1>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den = 1>
struct exp {
static constexpr const base_dimension& dimension = BaseDimension;
static constexpr int num = Num;
static constexpr int den = Den;
static constexpr std::intmax_t num = Num;
static constexpr std::intmax_t den = Den;
};
// exp_dim_id_less
@@ -80,7 +80,7 @@ namespace units {
template<typename E>
struct exp_invert;
template<const base_dimension& BaseDimension, int Num, int Den>
template<const base_dimension& BaseDimension, std::intmax_t Num, std::intmax_t Den>
struct exp_invert<exp<BaseDimension, Num, Den>> {
using type = exp<BaseDimension, -Num, Den>;
};
@@ -131,7 +131,7 @@ namespace units {
using type = conditional<std::is_same_v<rest, dimension<>>, dimension<E1>, type_list_push_front<rest, E1>>;
};
template<const base_dimension& D, int Num1, int Den1, int Num2, int Den2, typename... ERest>
template<const base_dimension& D, std::intmax_t Num1, std::intmax_t Den1, std::intmax_t Num2, std::intmax_t Den2, typename... ERest>
struct dim_consolidate<dimension<exp<D, Num1, Den1>, exp<D, Num2, Den2>, ERest...>> {
using r1 = std::ratio<Num1, Den1>;
using r2 = std::ratio<Num2, Den2>;
+3
View File
@@ -20,6 +20,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# check if conan installed a test framework
conan_check_testing(Catch2)
add_executable(unit_tests_runtime
catch_main.cpp
digital_info_test.cpp