mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-04 12:54:25 +02:00
fix: check selective QuantityValue requirements
This commit is contained in:
committed by
Mateusz Pusz
parent
5f135d11bb
commit
0b961dc71c
@@ -83,7 +83,9 @@ struct one_rep {
|
||||
[[nodiscard]] friend constexpr Rep operator/(one_rep, const Rep&) = delete;
|
||||
|
||||
template<typename Rep>
|
||||
requires requires { quantity_values<Rep>::one(); }
|
||||
requires requires { quantity_values<Rep>::one(); requires !Quantity<Rep> && // TODO: Replace with `QuantityValue`
|
||||
!QuantityLike<Rep> && // when Clang catches up.
|
||||
!wrapped_quantity_<Rep>; }
|
||||
[[nodiscard]] constexpr operator Rep() const noexcept
|
||||
{
|
||||
return quantity_values<Rep>::one();
|
||||
|
Reference in New Issue
Block a user