~ubuntu-branches/ubuntu/trusty/emscripten/trusty-proposed

« back to all changes in this revision

Viewing changes to system/include/libcxx/set

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2014-01-19 14:12:40 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20140119141240-jg1l42cc158j59tn
Tags: 1.9.0~20140119~7dc8c2f-1
* New snapshot release (Closes: #733714)
* Provide sources for javascript and flash. Done in orig-tar.sh
  Available in third_party/websockify/include/web-socket-js/src/
  (Closes: #735903)

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
    set(initializer_list<value_type> il, const value_compare& comp = value_compare());
67
67
    set(initializer_list<value_type> il, const value_compare& comp,
68
68
        const allocator_type& a);
 
69
    template <class InputIterator>
 
70
        set(InputIterator first, InputIterator last, const allocator_type& a)
 
71
            : set(first, last, Compare(), a) {}  // C++14
 
72
    set(initializer_list<value_type> il, const allocator_type& a)
 
73
        : set(il, Compare(), a) {}  // C++14
69
74
    ~set();
70
75
 
71
76
    set& operator=(const set& s);
129
134
    // set operations:
130
135
          iterator find(const key_type& k);
131
136
    const_iterator find(const key_type& k) const;
 
137
    template<typename K>
 
138
        iterator find(const K& x);
 
139
    template<typename K>
 
140
        const_iterator find(const K& x) const;  // C++14
 
141
    template<typename K>
 
142
      size_type count(const K& x) const;        // C++14
 
143
 
132
144
    size_type      count(const key_type& k) const;
133
145
          iterator lower_bound(const key_type& k);
134
146
    const_iterator lower_bound(const key_type& k) const;
 
147
    template<typename K>
 
148
        iterator lower_bound(const K& x);              // C++14
 
149
    template<typename K>
 
150
        const_iterator lower_bound(const K& x) const;  // C++14
 
151
 
135
152
          iterator upper_bound(const key_type& k);
136
153
    const_iterator upper_bound(const key_type& k) const;
 
154
    template<typename K>
 
155
        iterator upper_bound(const K& x);              // C++14
 
156
    template<typename K>
 
157
        const_iterator upper_bound(const K& x) const;  // C++14
137
158
    pair<iterator,iterator>             equal_range(const key_type& k);
138
159
    pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
 
160
    template<typename K>
 
161
        pair<iterator,iterator>             equal_range(const K& x);        // C++14
 
162
    template<typename K>
 
163
        pair<const_iterator,const_iterator> equal_range(const K& x) const;  // C++14
139
164
};
140
165
 
141
166
template <class Key, class Compare, class Allocator>
222
247
    multiset(initializer_list<value_type> il, const value_compare& comp = value_compare());
223
248
    multiset(initializer_list<value_type> il, const value_compare& comp,
224
249
             const allocator_type& a);
 
250
    template <class InputIterator>
 
251
        multiset(InputIterator first, InputIterator last, const allocator_type& a)
 
252
            : set(first, last, Compare(), a) {}  // C++14
 
253
    multiset(initializer_list<value_type> il, const allocator_type& a)
 
254
        : set(il, Compare(), a) {}  // C++14
225
255
    ~multiset();
226
256
 
227
257
    multiset& operator=(const multiset& s);
285
315
    // set operations:
286
316
          iterator find(const key_type& k);
287
317
    const_iterator find(const key_type& k) const;
 
318
    template<typename K>
 
319
        iterator find(const K& x);
 
320
    template<typename K>
 
321
        const_iterator find(const K& x) const;  // C++14
 
322
 
288
323
    size_type      count(const key_type& k) const;
289
324
          iterator lower_bound(const key_type& k);
290
325
    const_iterator lower_bound(const key_type& k) const;
 
326
    template<typename K>
 
327
        iterator lower_bound(const K& x);              // C++14
 
328
    template<typename K>
 
329
        const_iterator lower_bound(const K& x) const;  // C++14
 
330
 
291
331
          iterator upper_bound(const key_type& k);
292
332
    const_iterator upper_bound(const key_type& k) const;
 
333
    template<typename K>
 
334
        iterator upper_bound(const K& x);              // C++14
 
335
    template<typename K>
 
336
        const_iterator upper_bound(const K& x) const;  // C++14
 
337
 
293
338
    pair<iterator,iterator>             equal_range(const key_type& k);
294
339
    pair<const_iterator,const_iterator> equal_range(const key_type& k) const;
 
340
    template<typename K>
 
341
        pair<iterator,iterator>             equal_range(const K& x);        // C++14
 
342
    template<typename K>
 
343
        pair<const_iterator,const_iterator> equal_range(const K& x) const;  // C++14
295
344
};
296
345
 
297
346
template <class Key, class Compare, class Allocator>
346
395
 
347
396
template <class _Key, class _Compare = less<_Key>,
348
397
          class _Allocator = allocator<_Key> >
349
 
class _LIBCPP_TYPE_VIS set
 
398
class _LIBCPP_TYPE_VIS_ONLY set
350
399
{
351
400
public:
352
401
    // types:
403
452
            insert(__f, __l);
404
453
        }
405
454
 
 
455
#if _LIBCPP_STD_VER > 11
 
456
        template <class _InputIterator>
 
457
        _LIBCPP_INLINE_VISIBILITY 
 
458
        set(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
 
459
            : set(__f, __l, key_compare(), __a) {}
 
460
#endif
 
461
 
406
462
    _LIBCPP_INLINE_VISIBILITY
407
463
    set(const set& __s)
408
464
        : __tree_(__s.__tree_)
455
511
            insert(__il.begin(), __il.end());
456
512
        }
457
513
 
 
514
#if _LIBCPP_STD_VER > 11
 
515
    _LIBCPP_INLINE_VISIBILITY 
 
516
    set(initializer_list<value_type> __il, const allocator_type& __a)
 
517
        : set(__il, key_compare(), __a) {}
 
518
#endif
 
519
 
458
520
    _LIBCPP_INLINE_VISIBILITY
459
521
    set& operator=(initializer_list<value_type> __il)
460
522
        {
579
641
    iterator find(const key_type& __k)             {return __tree_.find(__k);}
580
642
    _LIBCPP_INLINE_VISIBILITY
581
643
    const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
 
644
#if _LIBCPP_STD_VER > 11
 
645
    template <typename _K2>
 
646
    _LIBCPP_INLINE_VISIBILITY
 
647
    typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
 
648
    find(const _K2& __k)                           {return __tree_.find(__k);}
 
649
    template <typename _K2>
 
650
    _LIBCPP_INLINE_VISIBILITY
 
651
    typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
 
652
    find(const _K2& __k) const                     {return __tree_.find(__k);}
 
653
#endif
 
654
 
582
655
    _LIBCPP_INLINE_VISIBILITY
583
656
    size_type      count(const key_type& __k) const
584
657
        {return __tree_.__count_unique(__k);}
588
661
    _LIBCPP_INLINE_VISIBILITY
589
662
    const_iterator lower_bound(const key_type& __k) const
590
663
        {return __tree_.lower_bound(__k);}
 
664
#if _LIBCPP_STD_VER > 11
 
665
    template <typename _K2>
 
666
    _LIBCPP_INLINE_VISIBILITY
 
667
    typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
 
668
    lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}
 
669
 
 
670
    template <typename _K2>
 
671
    _LIBCPP_INLINE_VISIBILITY
 
672
    typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
 
673
    lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
 
674
#endif
 
675
 
591
676
    _LIBCPP_INLINE_VISIBILITY
592
677
    iterator upper_bound(const key_type& __k)
593
678
        {return __tree_.upper_bound(__k);}
594
679
    _LIBCPP_INLINE_VISIBILITY
595
680
    const_iterator upper_bound(const key_type& __k) const
596
681
        {return __tree_.upper_bound(__k);}
 
682
#if _LIBCPP_STD_VER > 11
 
683
    template <typename _K2>
 
684
    _LIBCPP_INLINE_VISIBILITY
 
685
    typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
 
686
    upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
 
687
    template <typename _K2>
 
688
    _LIBCPP_INLINE_VISIBILITY
 
689
    typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
 
690
    upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
 
691
#endif
 
692
 
597
693
    _LIBCPP_INLINE_VISIBILITY
598
694
    pair<iterator,iterator> equal_range(const key_type& __k)
599
695
        {return __tree_.__equal_range_unique(__k);}
600
696
    _LIBCPP_INLINE_VISIBILITY
601
697
    pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
602
698
        {return __tree_.__equal_range_unique(__k);}
 
699
#if _LIBCPP_STD_VER > 11
 
700
    template <typename _K2>
 
701
    _LIBCPP_INLINE_VISIBILITY
 
702
    typename enable_if<__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
 
703
    equal_range(const _K2& __k)       {return __tree_.__equal_range_unique(__k);}
 
704
    template <typename _K2>
 
705
    _LIBCPP_INLINE_VISIBILITY
 
706
    typename enable_if<__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
 
707
    equal_range(const _K2& __k) const {return __tree_.__equal_range_unique(__k);}
 
708
#endif
603
709
};
604
710
 
605
711
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
685
791
 
686
792
template <class _Key, class _Compare = less<_Key>,
687
793
          class _Allocator = allocator<_Key> >
688
 
class _LIBCPP_TYPE_VIS multiset
 
794
class _LIBCPP_TYPE_VIS_ONLY multiset
689
795
{
690
796
public:
691
797
    // types:
734
840
            insert(__f, __l);
735
841
        }
736
842
 
 
843
#if _LIBCPP_STD_VER > 11
 
844
        template <class _InputIterator>
 
845
        _LIBCPP_INLINE_VISIBILITY 
 
846
        multiset(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
 
847
            : multiset(__f, __l, key_compare(), __a) {}
 
848
#endif
 
849
 
737
850
    template <class _InputIterator>
738
851
        _LIBCPP_INLINE_VISIBILITY
739
852
        multiset(_InputIterator __f, _InputIterator __l,
793
906
            insert(__il.begin(), __il.end());
794
907
        }
795
908
 
 
909
#if _LIBCPP_STD_VER > 11
 
910
    _LIBCPP_INLINE_VISIBILITY 
 
911
    multiset(initializer_list<value_type> __il, const allocator_type& __a)
 
912
        : multiset(__il, key_compare(), __a) {}
 
913
#endif
 
914
 
796
915
    _LIBCPP_INLINE_VISIBILITY
797
916
    multiset& operator=(initializer_list<value_type> __il)
798
917
        {
917
1036
    iterator find(const key_type& __k)             {return __tree_.find(__k);}
918
1037
    _LIBCPP_INLINE_VISIBILITY
919
1038
    const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
 
1039
#if _LIBCPP_STD_VER > 11
 
1040
    template <typename _K2>
 
1041
    _LIBCPP_INLINE_VISIBILITY
 
1042
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type
 
1043
    find(const _K2& __k)                           {return __tree_.find(__k);}
 
1044
    template <typename _K2>
 
1045
    _LIBCPP_INLINE_VISIBILITY
 
1046
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type
 
1047
    find(const _K2& __k) const                     {return __tree_.find(__k);}
 
1048
#endif
 
1049
 
920
1050
    _LIBCPP_INLINE_VISIBILITY
921
1051
    size_type      count(const key_type& __k) const
922
1052
        {return __tree_.__count_multi(__k);}
 
1053
 
923
1054
    _LIBCPP_INLINE_VISIBILITY
924
1055
    iterator lower_bound(const key_type& __k)
925
1056
        {return __tree_.lower_bound(__k);}
926
1057
    _LIBCPP_INLINE_VISIBILITY
927
1058
    const_iterator lower_bound(const key_type& __k) const
928
1059
            {return __tree_.lower_bound(__k);}
 
1060
#if _LIBCPP_STD_VER > 11
 
1061
    template <typename _K2>
 
1062
    _LIBCPP_INLINE_VISIBILITY
 
1063
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type
 
1064
    lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}
 
1065
 
 
1066
    template <typename _K2>
 
1067
    _LIBCPP_INLINE_VISIBILITY
 
1068
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type
 
1069
    lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
 
1070
#endif
 
1071
 
929
1072
    _LIBCPP_INLINE_VISIBILITY
930
1073
    iterator upper_bound(const key_type& __k)
931
1074
            {return __tree_.upper_bound(__k);}
932
1075
    _LIBCPP_INLINE_VISIBILITY
933
1076
    const_iterator upper_bound(const key_type& __k) const
934
1077
            {return __tree_.upper_bound(__k);}
 
1078
#if _LIBCPP_STD_VER > 11
 
1079
    template <typename _K2>
 
1080
    _LIBCPP_INLINE_VISIBILITY
 
1081
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,iterator>::type
 
1082
    upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
 
1083
    template <typename _K2>
 
1084
    _LIBCPP_INLINE_VISIBILITY
 
1085
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,const_iterator>::type
 
1086
    upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
 
1087
#endif
 
1088
 
935
1089
    _LIBCPP_INLINE_VISIBILITY
936
1090
    pair<iterator,iterator>             equal_range(const key_type& __k)
937
1091
            {return __tree_.__equal_range_multi(__k);}
938
1092
    _LIBCPP_INLINE_VISIBILITY
939
1093
    pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
940
1094
            {return __tree_.__equal_range_multi(__k);}
 
1095
#if _LIBCPP_STD_VER > 11
 
1096
    template <typename _K2>
 
1097
    _LIBCPP_INLINE_VISIBILITY
 
1098
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
 
1099
    equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
 
1100
    template <typename _K2>
 
1101
    _LIBCPP_INLINE_VISIBILITY
 
1102
    typename _VSTD::enable_if<_VSTD::__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
 
1103
    equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
 
1104
#endif
941
1105
};
942
1106
 
943
1107
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES