diff --git a/include/gsl/pointers b/include/gsl/pointers index 5cf1cf7..9c65a96 100644 --- a/include/gsl/pointers +++ b/include/gsl/pointers @@ -175,34 +175,34 @@ auto operator!=(const not_null& lhs, template auto operator<(const not_null& lhs, - const not_null& rhs) noexcept(noexcept(lhs.get() < rhs.get())) - -> decltype(lhs.get() < rhs.get()) + const not_null& rhs) noexcept(noexcept(std::less<>{}(lhs.get(), rhs.get()))) + -> decltype(std::less<>{}(lhs.get(), rhs.get())) { - return lhs.get() < rhs.get(); + return std::less<>{}(lhs.get(), rhs.get()); } template auto operator<=(const not_null& lhs, - const not_null& rhs) noexcept(noexcept(lhs.get() <= rhs.get())) - -> decltype(lhs.get() <= rhs.get()) + const not_null& rhs) noexcept(noexcept(std::less_equal<>{}(lhs.get(), rhs.get()))) + -> decltype(std::less_equal<>{}(lhs.get(), rhs.get())) { - return lhs.get() <= rhs.get(); + return std::less_equal<>{}(lhs.get(), rhs.get()); } template auto operator>(const not_null& lhs, - const not_null& rhs) noexcept(noexcept(lhs.get() > rhs.get())) - -> decltype(lhs.get() > rhs.get()) + const not_null& rhs) noexcept(noexcept(std::greater<>{}(lhs.get(), rhs.get()))) + -> decltype(std::greater<>{}(lhs.get(), rhs.get())) { - return lhs.get() > rhs.get(); + return std::greater<>{}(lhs.get(), rhs.get()); } template auto operator>=(const not_null& lhs, - const not_null& rhs) noexcept(noexcept(lhs.get() >= rhs.get())) - -> decltype(lhs.get() >= rhs.get()) + const not_null& rhs) noexcept(noexcept(std::greater_equal<>{}(lhs.get(), rhs.get()))) + -> decltype(std::greater_equal<>{}(lhs.get(), rhs.get())) { - return lhs.get() >= rhs.get(); + return std::greater_equal<>{}(lhs.get(), rhs.get()); } // more unwanted operators