feat: zero() static member function added to quantity_point

This commit is contained in:
Mateusz Pusz
2023-06-30 17:28:01 +01:00
parent b9802e5df1
commit d820cfe6cf

View File

@@ -83,6 +83,12 @@ public:
quantity_type q_; // needs to be public for a structural type quantity_type q_; // needs to be public for a structural type
// static member functions // static member functions
[[nodiscard]] static constexpr quantity_point zero() noexcept
requires requires { quantity_type::zero(); }
{
return quantity_point(quantity_type::zero());
}
[[nodiscard]] static constexpr quantity_point min() noexcept [[nodiscard]] static constexpr quantity_point min() noexcept
requires requires { quantity_type::min(); } requires requires { quantity_type::min(); }
{ {