Skip to content

Commit 35e1e4e

Browse files
Fix lower_bound and upper_bound
1 parent ac9a6ec commit 35e1e4e

File tree

1 file changed

+8
-8
lines changed
  • libcxx/include

1 file changed

+8
-8
lines changed

libcxx/include/map

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,37 +1342,37 @@ public:
13421342
# endif // _LIBCPP_STD_VER >= 20
13431343

13441344
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const key_type& __k) {
1345-
return __tree_.lower_bound(__k);
1345+
return __tree_.__lower_bound_unique(__k);
13461346
}
13471347
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const key_type& __k) const {
1348-
return __tree_.lower_bound(__k);
1348+
return __tree_.__lower_bound_unique(__k);
13491349
}
13501350
# if _LIBCPP_STD_VER >= 14
13511351
template <typename _K2, enable_if_t<__is_transparent_v<_Compare, _K2>, int> = 0>
13521352
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator lower_bound(const _K2& __k) {
1353-
return __tree_.lower_bound(__k);
1353+
return __tree_.__lower_bound_multi(__k);
13541354
}
13551355

13561356
template <typename _K2, enable_if_t<__is_transparent_v<_Compare, _K2>, int> = 0>
13571357
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator lower_bound(const _K2& __k) const {
1358-
return __tree_.lower_bound(__k);
1358+
return __tree_.__lower_bound_multi(__k);
13591359
}
13601360
# endif
13611361

13621362
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const key_type& __k) {
1363-
return __tree_.upper_bound(__k);
1363+
return __tree_.__upper_bound_unique(__k);
13641364
}
13651365
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const key_type& __k) const {
1366-
return __tree_.upper_bound(__k);
1366+
return __tree_.__upper_bound_unique(__k);
13671367
}
13681368
# if _LIBCPP_STD_VER >= 14
13691369
template <typename _K2, enable_if_t<__is_transparent_v<_Compare, _K2>, int> = 0>
13701370
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 iterator upper_bound(const _K2& __k) {
1371-
return __tree_.upper_bound(__k);
1371+
return __tree_.__upper_bound_multi(__k);
13721372
}
13731373
template <typename _K2, enable_if_t<__is_transparent_v<_Compare, _K2>, int> = 0>
13741374
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 const_iterator upper_bound(const _K2& __k) const {
1375-
return __tree_.upper_bound(__k);
1375+
return __tree_.__upper_bound_multi(__k);
13761376
}
13771377
# endif
13781378

0 commit comments

Comments
 (0)