@@ -129,13 +129,33 @@ public:
129
129
// set operations:
130
130
iterator find(const key_type& k);
131
131
const_iterator find(const key_type& k) const;
132
+ template<typename K>
133
+ iterator find(const K& x);
134
+ template<typename K>
135
+ const_iterator find(const K& x) const; // C++14
136
+ template<typename K>
137
+ size_type count(const K& x) const; // C++14
138
+
132
139
size_type count(const key_type& k) const;
133
140
iterator lower_bound(const key_type& k);
134
141
const_iterator lower_bound(const key_type& k) const;
142
+ template<typename K>
143
+ iterator lower_bound(const K& x); // C++14
144
+ template<typename K>
145
+ const_iterator lower_bound(const K& x) const; // C++14
146
+
135
147
iterator upper_bound(const key_type& k);
136
148
const_iterator upper_bound(const key_type& k) const;
149
+ template<typename K>
150
+ iterator upper_bound(const K& x); // C++14
151
+ template<typename K>
152
+ const_iterator upper_bound(const K& x) const; // C++14
137
153
pair<iterator,iterator> equal_range(const key_type& k);
138
154
pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
155
+ template<typename K>
156
+ pair<iterator,iterator> equal_range(const K& x); // C++14
157
+ template<typename K>
158
+ pair<const_iterator,const_iterator> equal_range(const K& x) const; // C++14
139
159
};
140
160
141
161
template <class Key, class Compare, class Allocator>
@@ -285,13 +305,32 @@ public:
285
305
// set operations:
286
306
iterator find(const key_type& k);
287
307
const_iterator find(const key_type& k) const;
308
+ template<typename K>
309
+ iterator find(const K& x);
310
+ template<typename K>
311
+ const_iterator find(const K& x) const; // C++14
312
+
288
313
size_type count(const key_type& k) const;
289
314
iterator lower_bound(const key_type& k);
290
315
const_iterator lower_bound(const key_type& k) const;
316
+ template<typename K>
317
+ iterator lower_bound(const K& x); // C++14
318
+ template<typename K>
319
+ const_iterator lower_bound(const K& x) const; // C++14
320
+
291
321
iterator upper_bound(const key_type& k);
292
322
const_iterator upper_bound(const key_type& k) const;
323
+ template<typename K>
324
+ iterator upper_bound(const K& x); // C++14
325
+ template<typename K>
326
+ const_iterator upper_bound(const K& x) const; // C++14
327
+
293
328
pair<iterator,iterator> equal_range(const key_type& k);
294
329
pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
330
+ template<typename K>
331
+ pair<iterator,iterator> equal_range(const K& x); // C++14
332
+ template<typename K>
333
+ pair<const_iterator,const_iterator> equal_range(const K& x) const; // C++14
295
334
};
296
335
297
336
template <class Key, class Compare, class Allocator>
@@ -579,6 +618,17 @@ public:
579
618
iterator find (const key_type& __k) {return __tree_.find (__k);}
580
619
_LIBCPP_INLINE_VISIBILITY
581
620
const_iterator find (const key_type& __k) const {return __tree_.find (__k);}
621
+ #if _LIBCPP_STD_VER > 11
622
+ template <typename _K2>
623
+ _LIBCPP_INLINE_VISIBILITY
624
+ typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
625
+ find (const _K2& __k) {return __tree_.find (__k);}
626
+ template <typename _K2>
627
+ _LIBCPP_INLINE_VISIBILITY
628
+ typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
629
+ find (const _K2& __k) const {return __tree_.find (__k);}
630
+ #endif
631
+
582
632
_LIBCPP_INLINE_VISIBILITY
583
633
size_type count (const key_type& __k) const
584
634
{return __tree_.__count_unique (__k);}
@@ -588,18 +638,51 @@ public:
588
638
_LIBCPP_INLINE_VISIBILITY
589
639
const_iterator lower_bound (const key_type& __k) const
590
640
{return __tree_.lower_bound (__k);}
641
+ #if _LIBCPP_STD_VER > 11
642
+ template <typename _K2>
643
+ _LIBCPP_INLINE_VISIBILITY
644
+ typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
645
+ lower_bound (const _K2& __k) {return __tree_.lower_bound (__k);}
646
+
647
+ template <typename _K2>
648
+ _LIBCPP_INLINE_VISIBILITY
649
+ typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
650
+ lower_bound (const _K2& __k) const {return __tree_.lower_bound (__k);}
651
+ #endif
652
+
591
653
_LIBCPP_INLINE_VISIBILITY
592
654
iterator upper_bound (const key_type& __k)
593
655
{return __tree_.upper_bound (__k);}
594
656
_LIBCPP_INLINE_VISIBILITY
595
657
const_iterator upper_bound (const key_type& __k) const
596
658
{return __tree_.upper_bound (__k);}
659
+ #if _LIBCPP_STD_VER > 11
660
+ template <typename _K2>
661
+ _LIBCPP_INLINE_VISIBILITY
662
+ typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
663
+ upper_bound (const _K2& __k) {return __tree_.upper_bound (__k);}
664
+ template <typename _K2>
665
+ _LIBCPP_INLINE_VISIBILITY
666
+ typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
667
+ upper_bound (const _K2& __k) const {return __tree_.upper_bound (__k);}
668
+ #endif
669
+
597
670
_LIBCPP_INLINE_VISIBILITY
598
671
pair<iterator,iterator> equal_range (const key_type& __k)
599
672
{return __tree_.__equal_range_unique (__k);}
600
673
_LIBCPP_INLINE_VISIBILITY
601
674
pair<const_iterator,const_iterator> equal_range (const key_type& __k) const
602
675
{return __tree_.__equal_range_unique (__k);}
676
+ #if _LIBCPP_STD_VER > 11
677
+ template <typename _K2>
678
+ _LIBCPP_INLINE_VISIBILITY
679
+ typename enable_if<__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
680
+ equal_range (const _K2& __k) {return __tree_.__equal_range_unique (__k);}
681
+ template <typename _K2>
682
+ _LIBCPP_INLINE_VISIBILITY
683
+ typename enable_if<__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
684
+ equal_range (const _K2& __k) const {return __tree_.__equal_range_unique (__k);}
685
+ #endif
603
686
};
604
687
605
688
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
@@ -917,27 +1000,72 @@ public:
917
1000
iterator find (const key_type& __k) {return __tree_.find (__k);}
918
1001
_LIBCPP_INLINE_VISIBILITY
919
1002
const_iterator find (const key_type& __k) const {return __tree_.find (__k);}
1003
+ #if _LIBCPP_STD_VER > 11
1004
+ template <typename _K2>
1005
+ _LIBCPP_INLINE_VISIBILITY
1006
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type
1007
+ find (const _K2& __k) {return __tree_.find (__k);}
1008
+ template <typename _K2>
1009
+ _LIBCPP_INLINE_VISIBILITY
1010
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type
1011
+ find (const _K2& __k) const {return __tree_.find (__k);}
1012
+ #endif
1013
+
920
1014
_LIBCPP_INLINE_VISIBILITY
921
1015
size_type count (const key_type& __k) const
922
1016
{return __tree_.__count_multi (__k);}
1017
+
923
1018
_LIBCPP_INLINE_VISIBILITY
924
1019
iterator lower_bound (const key_type& __k)
925
1020
{return __tree_.lower_bound (__k);}
926
1021
_LIBCPP_INLINE_VISIBILITY
927
1022
const_iterator lower_bound (const key_type& __k) const
928
1023
{return __tree_.lower_bound (__k);}
1024
+ #if _LIBCPP_STD_VER > 11
1025
+ template <typename _K2>
1026
+ _LIBCPP_INLINE_VISIBILITY
1027
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type
1028
+ lower_bound (const _K2& __k) {return __tree_.lower_bound (__k);}
1029
+
1030
+ template <typename _K2>
1031
+ _LIBCPP_INLINE_VISIBILITY
1032
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type
1033
+ lower_bound (const _K2& __k) const {return __tree_.lower_bound (__k);}
1034
+ #endif
1035
+
929
1036
_LIBCPP_INLINE_VISIBILITY
930
1037
iterator upper_bound (const key_type& __k)
931
1038
{return __tree_.upper_bound (__k);}
932
1039
_LIBCPP_INLINE_VISIBILITY
933
1040
const_iterator upper_bound (const key_type& __k) const
934
1041
{return __tree_.upper_bound (__k);}
1042
+ #if _LIBCPP_STD_VER > 11
1043
+ template <typename _K2>
1044
+ _LIBCPP_INLINE_VISIBILITY
1045
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type
1046
+ upper_bound (const _K2& __k) {return __tree_.upper_bound (__k);}
1047
+ template <typename _K2>
1048
+ _LIBCPP_INLINE_VISIBILITY
1049
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type
1050
+ upper_bound (const _K2& __k) const {return __tree_.upper_bound (__k);}
1051
+ #endif
1052
+
935
1053
_LIBCPP_INLINE_VISIBILITY
936
1054
pair<iterator,iterator> equal_range (const key_type& __k)
937
1055
{return __tree_.__equal_range_multi (__k);}
938
1056
_LIBCPP_INLINE_VISIBILITY
939
1057
pair<const_iterator,const_iterator> equal_range (const key_type& __k) const
940
1058
{return __tree_.__equal_range_multi (__k);}
1059
+ #if _LIBCPP_STD_VER > 11
1060
+ template <typename _K2>
1061
+ _LIBCPP_INLINE_VISIBILITY
1062
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
1063
+ equal_range (const _K2& __k) {return __tree_.__equal_range_multi (__k);}
1064
+ template <typename _K2>
1065
+ _LIBCPP_INLINE_VISIBILITY
1066
+ typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
1067
+ equal_range (const _K2& __k) const {return __tree_.__equal_range_multi (__k);}
1068
+ #endif
941
1069
};
942
1070
943
1071
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
0 commit comments