Fixed C++20 deprecation warning for std::rel_ops::operator<=

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-08-01 20:14:17 +02:00
committed by Konstantin Pastbin
parent 2aaf37e9ee
commit 7781528263
4 changed files with 13 additions and 5 deletions

View File

@@ -451,6 +451,17 @@ bool operator>(buffer_vector<T, N1> const & v1, buffer_vector<T, N2> const & v2)
{
return v2 < v1;
}
// TODO(AB): Use <=> operator.
// Used in:
// TrieChar const * const keyData = entry.GetKeyData();
// TTrieString key(keyData, keyData + entry.GetKeySize());
// using namespace std::rel_ops; // ">=" for keys.
// CHECK_GREATER_OR_EQUAL(key, prevKey, (key, prevKey));
template <typename T, size_t N1, size_t N2>
bool operator>=(buffer_vector<T, N1> const & v1, buffer_vector<T, N2> const & v2)
{
return !(v1 < v2);
}
namespace std
{