mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 04:44:27 +02:00
test: Tests for no conversion from a dimensionless quantity added
This commit is contained in:
@@ -133,6 +133,12 @@ static_assert(!std::convertible_to<min_expl<>, length<metre, int>>);
|
|||||||
static_assert(!std::constructible_from<length<metre, int>, length<metre, min_expl<>>>);
|
static_assert(!std::constructible_from<length<metre, int>, length<metre, min_expl<>>>);
|
||||||
static_assert(!std::convertible_to<length<metre, min_expl<>>, length<metre, int>>);
|
static_assert(!std::convertible_to<length<metre, min_expl<>>, length<metre, int>>);
|
||||||
|
|
||||||
|
static_assert(!std::constructible_from<length<metre, min_expl<>>, dimensionless<one>>);
|
||||||
|
static_assert(!std::convertible_to<dimensionless<one>, length<metre, min_expl<>>>);
|
||||||
|
|
||||||
|
static_assert(!std::constructible_from<length<metre, int>, dimensionless<one, min_expl<>>>);
|
||||||
|
static_assert(!std::convertible_to<dimensionless<one, min_expl<>>, length<metre, int>>);
|
||||||
|
|
||||||
// all operations needed to satisfy concept
|
// all operations needed to satisfy concept
|
||||||
static_assert(QuantityValue<min_expl<>>);
|
static_assert(QuantityValue<min_expl<>>);
|
||||||
static_assert(!QuantityValue<min_expl<1>>);
|
static_assert(!QuantityValue<min_expl<1>>);
|
||||||
|
Reference in New Issue
Block a user