mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-03 12:24:26 +02:00
operator-
constraints fixed
This commit is contained in:
@@ -258,8 +258,8 @@ namespace units {
|
||||
|
||||
template<typename T = Rep>
|
||||
[[nodiscard]] constexpr quantity operator-() const
|
||||
// requires std::magma<std::ranges::negate, T, T>
|
||||
// requires std::magma<std::ranges::negate, rep, rep> // TODO gated by gcc-9 (fixed in gcc-10)
|
||||
requires std::regular_invocable<std::ranges::negate, T>
|
||||
// requires std::regular_invocable<std::ranges::negate, rep> // TODO gated by gcc-9 (fixed in gcc-10)
|
||||
{
|
||||
return quantity(-count());
|
||||
}
|
||||
|
Reference in New Issue
Block a user