fix: forgot to commit a constructor for dimensionless quantities

This commit is contained in:
Mateusz Pusz
2023-05-16 14:05:01 +02:00
parent 56c8297c03
commit 01755d66ce

View File

@@ -148,6 +148,13 @@ public:
{ {
} }
template<typename Value>
requires(dimension == dimension_one) &&
(unit == ::mp_units::one) && detail::RepSafeConstructibleFrom<rep, std::remove_cvref_t<Value>>
constexpr explicit(!std::convertible_to<Value, Rep>) quantity(Value&& v) : number_(std::forward<Value>(v))
{
}
quantity& operator=(const quantity&) = default; quantity& operator=(const quantity&) = default;
quantity& operator=(quantity&&) = default; quantity& operator=(quantity&&) = default;