mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-02 11:54:27 +02:00
refactor: force_numerical_value_in
refactored to use force_in
in the implemenation and constraints
This commit is contained in:
@@ -198,10 +198,10 @@ public:
|
||||
}
|
||||
|
||||
template<Unit U>
|
||||
requires requires(quantity q) { value_cast<U{}>(q); }
|
||||
requires requires(quantity q) { q.force_in(U{}); }
|
||||
[[nodiscard]] constexpr rep force_numerical_value_in(U) const noexcept
|
||||
{
|
||||
return value_cast<U{}>(*this).numerical_value_in(U{});
|
||||
return (*this).force_in(U{}).numerical_value_ref_in(U{});
|
||||
}
|
||||
|
||||
// member unary operators
|
||||
|
Reference in New Issue
Block a user