@@ -1268,30 +1268,40 @@ public:
1268
1268
}
1269
1269
# endif // _LIBCPP_STD_VER >= 20
1270
1270
1271
- _LIBCPP_HIDE_FROM_ABI iterator lower_bound (const key_type& __k) { return __tree_.lower_bound (__k); }
1272
- _LIBCPP_HIDE_FROM_ABI const_iterator lower_bound (const key_type& __k) const { return __tree_.lower_bound (__k); }
1271
+ _LIBCPP_HIDE_FROM_ABI iterator lower_bound (const key_type& __k) { return __tree_.__lower_bound_unique (__k); }
1272
+
1273
+ _LIBCPP_HIDE_FROM_ABI const_iterator lower_bound (const key_type& __k) const {
1274
+ return __tree_.__lower_bound_unique (__k);
1275
+ }
1276
+
1277
+ // The transparent versions of the lookup functions use the _multi version, since a non-element key is allowed to
1278
+ // match multiple elements.
1273
1279
# if _LIBCPP_STD_VER >= 14
1274
1280
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1275
1281
_LIBCPP_HIDE_FROM_ABI iterator lower_bound (const _K2& __k) {
1276
- return __tree_.lower_bound (__k);
1282
+ return __tree_.__lower_bound_multi (__k);
1277
1283
}
1278
1284
1279
1285
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1280
1286
_LIBCPP_HIDE_FROM_ABI const_iterator lower_bound (const _K2& __k) const {
1281
- return __tree_.lower_bound (__k);
1287
+ return __tree_.__lower_bound_multi (__k);
1282
1288
}
1283
1289
# endif
1284
1290
1285
- _LIBCPP_HIDE_FROM_ABI iterator upper_bound (const key_type& __k) { return __tree_.upper_bound (__k); }
1286
- _LIBCPP_HIDE_FROM_ABI const_iterator upper_bound (const key_type& __k) const { return __tree_.upper_bound (__k); }
1291
+ _LIBCPP_HIDE_FROM_ABI iterator upper_bound (const key_type& __k) { return __tree_.__upper_bound_unique (__k); }
1292
+
1293
+ _LIBCPP_HIDE_FROM_ABI const_iterator upper_bound (const key_type& __k) const {
1294
+ return __tree_.__upper_bound_unique (__k);
1295
+ }
1296
+
1287
1297
# if _LIBCPP_STD_VER >= 14
1288
1298
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1289
1299
_LIBCPP_HIDE_FROM_ABI iterator upper_bound (const _K2& __k) {
1290
- return __tree_.upper_bound (__k);
1300
+ return __tree_.__upper_bound_multi (__k);
1291
1301
}
1292
1302
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1293
1303
_LIBCPP_HIDE_FROM_ABI const_iterator upper_bound (const _K2& __k) const {
1294
- return __tree_.upper_bound (__k);
1304
+ return __tree_.__upper_bound_multi (__k);
1295
1305
}
1296
1306
# endif
1297
1307
@@ -1831,30 +1841,38 @@ public:
1831
1841
}
1832
1842
# endif // _LIBCPP_STD_VER >= 20
1833
1843
1834
- _LIBCPP_HIDE_FROM_ABI iterator lower_bound (const key_type& __k) { return __tree_.lower_bound (__k); }
1835
- _LIBCPP_HIDE_FROM_ABI const_iterator lower_bound (const key_type& __k) const { return __tree_.lower_bound (__k); }
1844
+ _LIBCPP_HIDE_FROM_ABI iterator lower_bound (const key_type& __k) { return __tree_.__lower_bound_multi (__k); }
1845
+
1846
+ _LIBCPP_HIDE_FROM_ABI const_iterator lower_bound (const key_type& __k) const {
1847
+ return __tree_.__lower_bound_multi (__k);
1848
+ }
1849
+
1836
1850
# if _LIBCPP_STD_VER >= 14
1837
1851
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1838
1852
_LIBCPP_HIDE_FROM_ABI iterator lower_bound (const _K2& __k) {
1839
- return __tree_.lower_bound (__k);
1853
+ return __tree_.__lower_bound_multi (__k);
1840
1854
}
1841
1855
1842
1856
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1843
1857
_LIBCPP_HIDE_FROM_ABI const_iterator lower_bound (const _K2& __k) const {
1844
- return __tree_.lower_bound (__k);
1858
+ return __tree_.__lower_bound_multi (__k);
1845
1859
}
1846
1860
# endif
1847
1861
1848
- _LIBCPP_HIDE_FROM_ABI iterator upper_bound (const key_type& __k) { return __tree_.upper_bound (__k); }
1849
- _LIBCPP_HIDE_FROM_ABI const_iterator upper_bound (const key_type& __k) const { return __tree_.upper_bound (__k); }
1862
+ _LIBCPP_HIDE_FROM_ABI iterator upper_bound (const key_type& __k) { return __tree_.__upper_bound_multi (__k); }
1863
+
1864
+ _LIBCPP_HIDE_FROM_ABI const_iterator upper_bound (const key_type& __k) const {
1865
+ return __tree_.__upper_bound_multi (__k);
1866
+ }
1867
+
1850
1868
# if _LIBCPP_STD_VER >= 14
1851
1869
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1852
1870
_LIBCPP_HIDE_FROM_ABI iterator upper_bound (const _K2& __k) {
1853
- return __tree_.upper_bound (__k);
1871
+ return __tree_.__upper_bound_multi (__k);
1854
1872
}
1855
1873
template <typename _K2, enable_if_t <__is_transparent_v<_Compare, _K2>, int > = 0 >
1856
1874
_LIBCPP_HIDE_FROM_ABI const_iterator upper_bound (const _K2& __k) const {
1857
- return __tree_.upper_bound (__k);
1875
+ return __tree_.__upper_bound_multi (__k);
1858
1876
}
1859
1877
# endif
1860
1878
0 commit comments