mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 20:54:28 +02:00
feat: zero()
static member function added to quantity_point
This commit is contained in:
@@ -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(); }
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user