diff options
| author | babenko <[email protected]> | 2026-04-19 13:00:04 +0300 |
|---|---|---|
| committer | babenko <[email protected]> | 2026-04-19 13:32:33 +0300 |
| commit | fe807ca0341d1dfb66e65530e615dd1cd9f9209e (patch) | |
| tree | 403cf4a0db45c1c51c225178d060d4277372ea1f /library/cpp | |
| parent | 5ee91d1309b1584693b97972b791ccd9575aed1f (diff) | |
Use proper key comparer in TCompactFlatMap
commit_hash:fe925e642ebbb6e9929cf82358873ddb8b754b90
Diffstat (limited to 'library/cpp')
| -rw-r--r-- | library/cpp/yt/compact_containers/compact_flat_map-inl.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/cpp/yt/compact_containers/compact_flat_map-inl.h b/library/cpp/yt/compact_containers/compact_flat_map-inl.h index 7bc52cbb1bb..87cb9841436 100644 --- a/library/cpp/yt/compact_containers/compact_flat_map-inl.h +++ b/library/cpp/yt/compact_containers/compact_flat_map-inl.h @@ -193,7 +193,7 @@ template <NDetail::CComparisonAllowed<TKey, TKeyCompare> TOtherKey> std::pair<typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::iterator, typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::iterator> TCompactFlatMap<TKey, TValue, N, TKeyCompare>::equal_range(const TOtherKey& k) { - auto result = std::ranges::equal_range(Storage_, k, {}, &value_type::first); + auto result = std::ranges::equal_range(Storage_, k, TKeyCompare{}, &value_type::first); YT_ASSERT(result.size() <= 1); return result; } @@ -203,7 +203,7 @@ template <NDetail::CComparisonAllowed<TKey, TKeyCompare> TOtherKey> std::pair<typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::const_iterator, typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::const_iterator> TCompactFlatMap<TKey, TValue, N, TKeyCompare>::equal_range(const TOtherKey& k) const { - auto result = std::ranges::equal_range(Storage_, k, {}, &value_type::first); + auto result = std::ranges::equal_range(Storage_, k, TKeyCompare{}, &value_type::first); YT_ASSERT(result.size() <= 1); return result; } @@ -212,28 +212,28 @@ template <class TKey, class TValue, size_t N, class TKeyCompare> template <NDetail::CComparisonAllowed<TKey, TKeyCompare> TOtherKey> typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::const_iterator TCompactFlatMap<TKey, TValue, N, TKeyCompare>::lower_bound(const TOtherKey& k) const { - return std::ranges::lower_bound(Storage_, k, {}, &value_type::first); + return std::ranges::lower_bound(Storage_, k, TKeyCompare{}, &value_type::first); } template <class TKey, class TValue, size_t N, class TKeyCompare> template <NDetail::CComparisonAllowed<TKey, TKeyCompare> TOtherKey> typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::iterator TCompactFlatMap<TKey, TValue, N, TKeyCompare>::lower_bound(const TOtherKey& k) { - return std::ranges::lower_bound(Storage_, k, {}, &value_type::first); + return std::ranges::lower_bound(Storage_, k, TKeyCompare{}, &value_type::first); } template <class TKey, class TValue, size_t N, class TKeyCompare> template <NDetail::CComparisonAllowed<TKey, TKeyCompare> TOtherKey> typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::const_iterator TCompactFlatMap<TKey, TValue, N, TKeyCompare>::upper_bound(const TOtherKey& k) const { - return std::ranges::upper_bound(Storage_, k, {}, &value_type::first); + return std::ranges::upper_bound(Storage_, k, TKeyCompare{}, &value_type::first); } template <class TKey, class TValue, size_t N, class TKeyCompare> template <NDetail::CComparisonAllowed<TKey, TKeyCompare> TOtherKey> typename TCompactFlatMap<TKey, TValue, N, TKeyCompare>::iterator TCompactFlatMap<TKey, TValue, N, TKeyCompare>::upper_bound(const TOtherKey& k) { - return std::ranges::upper_bound(Storage_, k, {}, &value_type::first); + return std::ranges::upper_bound(Storage_, k, TKeyCompare{}, &value_type::first); } //////////////////////////////////////////////////////////////////////////////// |
