template <typename Compare, typename Key>

struct key_compare_adapter

Defined at line 198 of file ../../third_party/abseil-cpp/absl/container/internal/btree.h

A helper class to adapt the specified comparator for two use cases:

(1) When using common Abseil string types with common comparison functors,

convert a boolean comparison into a three-way comparison that returns an

`absl::weak_ordering`. This helper class is specialized for

less

<std

::string>, greater

<std

::string>, less

<string

_view>,

greater

<string

_view>, less

<absl

::Cord>, and greater

<absl

::Cord>.

(2) Adapt the comparator to diagnose cases of non-strict-weak-ordering (see

https://en.cppreference.com/w/cpp/named_req/Compare) in debug mode. Whenever

a comparison is made, we will make assertions to verify that the comparator

is valid.

Records