From 9f7349de6d5e58f6c62c5c5e058f895fd9eeaa53 Mon Sep 17 00:00:00 2001 From: isidorostsa Date: Thu, 28 Nov 2024 13:56:04 +0200 Subject: [PATCH] Enable inplace_vector for comparison operators --- .../datastructures/detail/small_vector.hpp | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/libs/core/datastructures/include/hpx/datastructures/detail/small_vector.hpp b/libs/core/datastructures/include/hpx/datastructures/detail/small_vector.hpp index 4c5f5268849..2df3a0c407c 100644 --- a/libs/core/datastructures/include/hpx/datastructures/detail/small_vector.hpp +++ b/libs/core/datastructures/include/hpx/datastructures/detail/small_vector.hpp @@ -1356,46 +1356,46 @@ namespace hpx::detail { } }; - template - [[nodiscard]] constexpr auto operator==(small_vector const& a, - small_vector const& b) noexcept -> bool + template + [[nodiscard]] constexpr auto operator==(small_vector const& a, + small_vector const& b) noexcept -> bool { return std::equal(a.begin(), a.end(), b.begin(), b.end()); } - template - [[nodiscard]] constexpr auto operator!=(small_vector const& a, - small_vector const& b) noexcept -> bool + template + [[nodiscard]] constexpr auto operator!=(small_vector const& a, + small_vector const& b) noexcept -> bool { return !(a == b); } - template - [[nodiscard]] constexpr auto operator<(small_vector const& a, - small_vector const& b) noexcept -> bool + template + [[nodiscard]] constexpr auto operator<(small_vector const& a, + small_vector const& b) noexcept -> bool { return std::lexicographical_compare( a.begin(), a.end(), b.begin(), b.end()); } - template - [[nodiscard]] constexpr auto operator>=(small_vector const& a, - small_vector const& b) noexcept -> bool + template + [[nodiscard]] constexpr auto operator>=(small_vector const& a, + small_vector const& b) noexcept -> bool { return !(a < b); } - template - [[nodiscard]] constexpr auto operator>(small_vector const& a, - small_vector const& b) noexcept -> bool + template + [[nodiscard]] constexpr auto operator>(small_vector const& a, + small_vector const& b) noexcept -> bool { return std::lexicographical_compare( b.begin(), b.end(), a.begin(), a.end()); } - template - [[nodiscard]] constexpr auto operator<=(small_vector const& a, - small_vector const& b) noexcept -> bool + template + [[nodiscard]] constexpr auto operator<=(small_vector const& a, + small_vector const& b) noexcept -> bool { return !(a > b); }