feat: quantities can now be multiplied and divided by units

This commit is contained in:
Mateusz Pusz
2023-09-29 21:40:24 -06:00
parent 476a68ce8e
commit b2423bfded
25 changed files with 79 additions and 118 deletions
+2 -2
View File
@@ -594,8 +594,8 @@ static_assert(is_of_type<1. * km - 1. * m, quantity<si::metre, double>>);
static_assert(is_of_type<1 * m % (1 * km), quantity<si::metre, int>>);
// different dimensions
static_assert(is_of_type<1 * (m / s) * (1 * s), quantity<si::metre, int>>);
static_assert(is_of_type<1 * (m / s) * (1 * h),
static_assert(is_of_type<1 * m / s * (1 * s), quantity<si::metre, int>>);
static_assert(is_of_type<1 * m / s * (1 * h),
quantity<derived_unit<struct si::hour, struct si::metre, per<struct si::second>>{}, int>>);
static_assert(is_of_type<1 * m * (1 * min), quantity<derived_unit<struct si::metre, struct si::minute>{}, int>>);
static_assert(is_of_type<1 * s * (1 * Hz), quantity<derived_unit<struct si::hertz, struct si::second>{}, int>>);