00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #ifndef _STL_ITERATOR_H
00062 #define _STL_ITERATOR_H 1
00063
00064 #include <bits/cpp_type_traits.h>
00065 #include <ext/type_traits.h>
00066 #include <bits/move.h>
00067
00068 namespace std _GLIBCXX_VISIBILITY(default)
00069 {
00070 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 template<typename _Iterator>
00097 class reverse_iterator
00098 : public iterator<typename iterator_traits<_Iterator>::iterator_category,
00099 typename iterator_traits<_Iterator>::value_type,
00100 typename iterator_traits<_Iterator>::difference_type,
00101 typename iterator_traits<_Iterator>::pointer,
00102 typename iterator_traits<_Iterator>::reference>
00103 {
00104 protected:
00105 _Iterator current;
00106
00107 typedef iterator_traits<_Iterator> __traits_type;
00108
00109 public:
00110 typedef _Iterator iterator_type;
00111 typedef typename __traits_type::difference_type difference_type;
00112 typedef typename __traits_type::pointer pointer;
00113 typedef typename __traits_type::reference reference;
00114
00115
00116
00117
00118
00119
00120
00121 reverse_iterator() : current() { }
00122
00123
00124
00125
00126 explicit
00127 reverse_iterator(iterator_type __x) : current(__x) { }
00128
00129
00130
00131
00132 reverse_iterator(const reverse_iterator& __x)
00133 : current(__x.current) { }
00134
00135
00136
00137
00138
00139 template<typename _Iter>
00140 reverse_iterator(const reverse_iterator<_Iter>& __x)
00141 : current(__x.base()) { }
00142
00143
00144
00145
00146 iterator_type
00147 base() const
00148 { return current; }
00149
00150
00151
00152
00153
00154
00155 reference
00156 operator*() const
00157 {
00158 _Iterator __tmp = current;
00159 return *--__tmp;
00160 }
00161
00162
00163
00164
00165
00166
00167 pointer
00168 operator->() const
00169 { return &(operator*()); }
00170
00171
00172
00173
00174
00175
00176 reverse_iterator&
00177 operator++()
00178 {
00179 --current;
00180 return *this;
00181 }
00182
00183
00184
00185
00186
00187
00188 reverse_iterator
00189 operator++(int)
00190 {
00191 reverse_iterator __tmp = *this;
00192 --current;
00193 return __tmp;
00194 }
00195
00196
00197
00198
00199
00200
00201 reverse_iterator&
00202 operator--()
00203 {
00204 ++current;
00205 return *this;
00206 }
00207
00208
00209
00210
00211
00212
00213 reverse_iterator
00214 operator--(int)
00215 {
00216 reverse_iterator __tmp = *this;
00217 ++current;
00218 return __tmp;
00219 }
00220
00221
00222
00223
00224
00225
00226 reverse_iterator
00227 operator+(difference_type __n) const
00228 { return reverse_iterator(current - __n); }
00229
00230
00231
00232
00233
00234
00235 reverse_iterator&
00236 operator+=(difference_type __n)
00237 {
00238 current -= __n;
00239 return *this;
00240 }
00241
00242
00243
00244
00245
00246
00247 reverse_iterator
00248 operator-(difference_type __n) const
00249 { return reverse_iterator(current + __n); }
00250
00251
00252
00253
00254
00255
00256 reverse_iterator&
00257 operator-=(difference_type __n)
00258 {
00259 current += __n;
00260 return *this;
00261 }
00262
00263
00264
00265
00266
00267
00268 reference
00269 operator[](difference_type __n) const
00270 { return *(*this + __n); }
00271 };
00272
00273
00274
00275
00276
00277
00278
00279
00280
00281
00282
00283 template<typename _Iterator>
00284 inline bool
00285 operator==(const reverse_iterator<_Iterator>& __x,
00286 const reverse_iterator<_Iterator>& __y)
00287 { return __x.base() == __y.base(); }
00288
00289 template<typename _Iterator>
00290 inline bool
00291 operator<(const reverse_iterator<_Iterator>& __x,
00292 const reverse_iterator<_Iterator>& __y)
00293 { return __y.base() < __x.base(); }
00294
00295 template<typename _Iterator>
00296 inline bool
00297 operator!=(const reverse_iterator<_Iterator>& __x,
00298 const reverse_iterator<_Iterator>& __y)
00299 { return !(__x == __y); }
00300
00301 template<typename _Iterator>
00302 inline bool
00303 operator>(const reverse_iterator<_Iterator>& __x,
00304 const reverse_iterator<_Iterator>& __y)
00305 { return __y < __x; }
00306
00307 template<typename _Iterator>
00308 inline bool
00309 operator<=(const reverse_iterator<_Iterator>& __x,
00310 const reverse_iterator<_Iterator>& __y)
00311 { return !(__y < __x); }
00312
00313 template<typename _Iterator>
00314 inline bool
00315 operator>=(const reverse_iterator<_Iterator>& __x,
00316 const reverse_iterator<_Iterator>& __y)
00317 { return !(__x < __y); }
00318
00319 template<typename _Iterator>
00320 inline typename reverse_iterator<_Iterator>::difference_type
00321 operator-(const reverse_iterator<_Iterator>& __x,
00322 const reverse_iterator<_Iterator>& __y)
00323 { return __y.base() - __x.base(); }
00324
00325 template<typename _Iterator>
00326 inline reverse_iterator<_Iterator>
00327 operator+(typename reverse_iterator<_Iterator>::difference_type __n,
00328 const reverse_iterator<_Iterator>& __x)
00329 { return reverse_iterator<_Iterator>(__x.base() - __n); }
00330
00331
00332
00333 template<typename _IteratorL, typename _IteratorR>
00334 inline bool
00335 operator==(const reverse_iterator<_IteratorL>& __x,
00336 const reverse_iterator<_IteratorR>& __y)
00337 { return __x.base() == __y.base(); }
00338
00339 template<typename _IteratorL, typename _IteratorR>
00340 inline bool
00341 operator<(const reverse_iterator<_IteratorL>& __x,
00342 const reverse_iterator<_IteratorR>& __y)
00343 { return __y.base() < __x.base(); }
00344
00345 template<typename _IteratorL, typename _IteratorR>
00346 inline bool
00347 operator!=(const reverse_iterator<_IteratorL>& __x,
00348 const reverse_iterator<_IteratorR>& __y)
00349 { return !(__x == __y); }
00350
00351 template<typename _IteratorL, typename _IteratorR>
00352 inline bool
00353 operator>(const reverse_iterator<_IteratorL>& __x,
00354 const reverse_iterator<_IteratorR>& __y)
00355 { return __y < __x; }
00356
00357 template<typename _IteratorL, typename _IteratorR>
00358 inline bool
00359 operator<=(const reverse_iterator<_IteratorL>& __x,
00360 const reverse_iterator<_IteratorR>& __y)
00361 { return !(__y < __x); }
00362
00363 template<typename _IteratorL, typename _IteratorR>
00364 inline bool
00365 operator>=(const reverse_iterator<_IteratorL>& __x,
00366 const reverse_iterator<_IteratorR>& __y)
00367 { return !(__x < __y); }
00368
00369 template<typename _IteratorL, typename _IteratorR>
00370 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00371
00372 inline auto
00373 operator-(const reverse_iterator<_IteratorL>& __x,
00374 const reverse_iterator<_IteratorR>& __y)
00375 -> decltype(__y.base() - __x.base())
00376 #else
00377 inline typename reverse_iterator<_IteratorL>::difference_type
00378 operator-(const reverse_iterator<_IteratorL>& __x,
00379 const reverse_iterator<_IteratorR>& __y)
00380 #endif
00381 { return __y.base() - __x.base(); }
00382
00383
00384
00385
00386
00387
00388
00389
00390
00391
00392
00393
00394
00395 template<typename _Container>
00396 class back_insert_iterator
00397 : public iterator<output_iterator_tag, void, void, void, void>
00398 {
00399 protected:
00400 _Container* container;
00401
00402 public:
00403
00404 typedef _Container container_type;
00405
00406
00407 explicit
00408 back_insert_iterator(_Container& __x) : container(&__x) { }
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421 #ifndef __GXX_EXPERIMENTAL_CXX0X__
00422 back_insert_iterator&
00423 operator=(typename _Container::const_reference __value)
00424 {
00425 container->push_back(__value);
00426 return *this;
00427 }
00428 #else
00429 back_insert_iterator&
00430 operator=(const typename _Container::value_type& __value)
00431 {
00432 container->push_back(__value);
00433 return *this;
00434 }
00435
00436 back_insert_iterator&
00437 operator=(typename _Container::value_type&& __value)
00438 {
00439 container->push_back(std::move(__value));
00440 return *this;
00441 }
00442 #endif
00443
00444
00445 back_insert_iterator&
00446 operator*()
00447 { return *this; }
00448
00449
00450 back_insert_iterator&
00451 operator++()
00452 { return *this; }
00453
00454
00455 back_insert_iterator
00456 operator++(int)
00457 { return *this; }
00458 };
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471 template<typename _Container>
00472 inline back_insert_iterator<_Container>
00473 back_inserter(_Container& __x)
00474 { return back_insert_iterator<_Container>(__x); }
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486 template<typename _Container>
00487 class front_insert_iterator
00488 : public iterator<output_iterator_tag, void, void, void, void>
00489 {
00490 protected:
00491 _Container* container;
00492
00493 public:
00494
00495 typedef _Container container_type;
00496
00497
00498 explicit front_insert_iterator(_Container& __x) : container(&__x) { }
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511 #ifndef __GXX_EXPERIMENTAL_CXX0X__
00512 front_insert_iterator&
00513 operator=(typename _Container::const_reference __value)
00514 {
00515 container->push_front(__value);
00516 return *this;
00517 }
00518 #else
00519 front_insert_iterator&
00520 operator=(const typename _Container::value_type& __value)
00521 {
00522 container->push_front(__value);
00523 return *this;
00524 }
00525
00526 front_insert_iterator&
00527 operator=(typename _Container::value_type&& __value)
00528 {
00529 container->push_front(std::move(__value));
00530 return *this;
00531 }
00532 #endif
00533
00534
00535 front_insert_iterator&
00536 operator*()
00537 { return *this; }
00538
00539
00540 front_insert_iterator&
00541 operator++()
00542 { return *this; }
00543
00544
00545 front_insert_iterator
00546 operator++(int)
00547 { return *this; }
00548 };
00549
00550
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561 template<typename _Container>
00562 inline front_insert_iterator<_Container>
00563 front_inserter(_Container& __x)
00564 { return front_insert_iterator<_Container>(__x); }
00565
00566
00567
00568
00569
00570
00571
00572
00573
00574
00575
00576
00577
00578
00579
00580 template<typename _Container>
00581 class insert_iterator
00582 : public iterator<output_iterator_tag, void, void, void, void>
00583 {
00584 protected:
00585 _Container* container;
00586 typename _Container::iterator iter;
00587
00588 public:
00589
00590 typedef _Container container_type;
00591
00592
00593
00594
00595
00596 insert_iterator(_Container& __x, typename _Container::iterator __i)
00597 : container(&__x), iter(__i) {}
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622 #ifndef __GXX_EXPERIMENTAL_CXX0X__
00623 insert_iterator&
00624 operator=(typename _Container::const_reference __value)
00625 {
00626 iter = container->insert(iter, __value);
00627 ++iter;
00628 return *this;
00629 }
00630 #else
00631 insert_iterator&
00632 operator=(const typename _Container::value_type& __value)
00633 {
00634 iter = container->insert(iter, __value);
00635 ++iter;
00636 return *this;
00637 }
00638
00639 insert_iterator&
00640 operator=(typename _Container::value_type&& __value)
00641 {
00642 iter = container->insert(iter, std::move(__value));
00643 ++iter;
00644 return *this;
00645 }
00646 #endif
00647
00648
00649 insert_iterator&
00650 operator*()
00651 { return *this; }
00652
00653
00654 insert_iterator&
00655 operator++()
00656 { return *this; }
00657
00658
00659 insert_iterator&
00660 operator++(int)
00661 { return *this; }
00662 };
00663
00664
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675 template<typename _Container, typename _Iterator>
00676 inline insert_iterator<_Container>
00677 inserter(_Container& __x, _Iterator __i)
00678 {
00679 return insert_iterator<_Container>(__x,
00680 typename _Container::iterator(__i));
00681 }
00682
00683
00684
00685 _GLIBCXX_END_NAMESPACE_VERSION
00686 }
00687
00688 namespace __gnu_cxx _GLIBCXX_VISIBILITY(default)
00689 {
00690 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00691
00692
00693
00694
00695
00696
00697
00698
00699 using std::iterator_traits;
00700 using std::iterator;
00701 template<typename _Iterator, typename _Container>
00702 class __normal_iterator
00703 {
00704 protected:
00705 _Iterator _M_current;
00706
00707 typedef iterator_traits<_Iterator> __traits_type;
00708
00709 public:
00710 typedef _Iterator iterator_type;
00711 typedef typename __traits_type::iterator_category iterator_category;
00712 typedef typename __traits_type::value_type value_type;
00713 typedef typename __traits_type::difference_type difference_type;
00714 typedef typename __traits_type::reference reference;
00715 typedef typename __traits_type::pointer pointer;
00716
00717 _GLIBCXX_CONSTEXPR __normal_iterator() : _M_current(_Iterator()) { }
00718
00719 explicit
00720 __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
00721
00722
00723 template<typename _Iter>
00724 __normal_iterator(const __normal_iterator<_Iter,
00725 typename __enable_if<
00726 (std::__are_same<_Iter, typename _Container::pointer>::__value),
00727 _Container>::__type>& __i)
00728 : _M_current(__i.base()) { }
00729
00730
00731 reference
00732 operator*() const
00733 { return *_M_current; }
00734
00735 pointer
00736 operator->() const
00737 { return _M_current; }
00738
00739 __normal_iterator&
00740 operator++()
00741 {
00742 ++_M_current;
00743 return *this;
00744 }
00745
00746 __normal_iterator
00747 operator++(int)
00748 { return __normal_iterator(_M_current++); }
00749
00750
00751 __normal_iterator&
00752 operator--()
00753 {
00754 --_M_current;
00755 return *this;
00756 }
00757
00758 __normal_iterator
00759 operator--(int)
00760 { return __normal_iterator(_M_current--); }
00761
00762
00763 reference
00764 operator[](const difference_type& __n) const
00765 { return _M_current[__n]; }
00766
00767 __normal_iterator&
00768 operator+=(const difference_type& __n)
00769 { _M_current += __n; return *this; }
00770
00771 __normal_iterator
00772 operator+(const difference_type& __n) const
00773 { return __normal_iterator(_M_current + __n); }
00774
00775 __normal_iterator&
00776 operator-=(const difference_type& __n)
00777 { _M_current -= __n; return *this; }
00778
00779 __normal_iterator
00780 operator-(const difference_type& __n) const
00781 { return __normal_iterator(_M_current - __n); }
00782
00783 const _Iterator&
00784 base() const
00785 { return _M_current; }
00786 };
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797 template<typename _IteratorL, typename _IteratorR, typename _Container>
00798 inline bool
00799 operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
00800 const __normal_iterator<_IteratorR, _Container>& __rhs)
00801 { return __lhs.base() == __rhs.base(); }
00802
00803 template<typename _Iterator, typename _Container>
00804 inline bool
00805 operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
00806 const __normal_iterator<_Iterator, _Container>& __rhs)
00807 { return __lhs.base() == __rhs.base(); }
00808
00809 template<typename _IteratorL, typename _IteratorR, typename _Container>
00810 inline bool
00811 operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
00812 const __normal_iterator<_IteratorR, _Container>& __rhs)
00813 { return __lhs.base() != __rhs.base(); }
00814
00815 template<typename _Iterator, typename _Container>
00816 inline bool
00817 operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
00818 const __normal_iterator<_Iterator, _Container>& __rhs)
00819 { return __lhs.base() != __rhs.base(); }
00820
00821
00822 template<typename _IteratorL, typename _IteratorR, typename _Container>
00823 inline bool
00824 operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
00825 const __normal_iterator<_IteratorR, _Container>& __rhs)
00826 { return __lhs.base() < __rhs.base(); }
00827
00828 template<typename _Iterator, typename _Container>
00829 inline bool
00830 operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
00831 const __normal_iterator<_Iterator, _Container>& __rhs)
00832 { return __lhs.base() < __rhs.base(); }
00833
00834 template<typename _IteratorL, typename _IteratorR, typename _Container>
00835 inline bool
00836 operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
00837 const __normal_iterator<_IteratorR, _Container>& __rhs)
00838 { return __lhs.base() > __rhs.base(); }
00839
00840 template<typename _Iterator, typename _Container>
00841 inline bool
00842 operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
00843 const __normal_iterator<_Iterator, _Container>& __rhs)
00844 { return __lhs.base() > __rhs.base(); }
00845
00846 template<typename _IteratorL, typename _IteratorR, typename _Container>
00847 inline bool
00848 operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
00849 const __normal_iterator<_IteratorR, _Container>& __rhs)
00850 { return __lhs.base() <= __rhs.base(); }
00851
00852 template<typename _Iterator, typename _Container>
00853 inline bool
00854 operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
00855 const __normal_iterator<_Iterator, _Container>& __rhs)
00856 { return __lhs.base() <= __rhs.base(); }
00857
00858 template<typename _IteratorL, typename _IteratorR, typename _Container>
00859 inline bool
00860 operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
00861 const __normal_iterator<_IteratorR, _Container>& __rhs)
00862 { return __lhs.base() >= __rhs.base(); }
00863
00864 template<typename _Iterator, typename _Container>
00865 inline bool
00866 operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
00867 const __normal_iterator<_Iterator, _Container>& __rhs)
00868 { return __lhs.base() >= __rhs.base(); }
00869
00870
00871
00872
00873
00874 template<typename _IteratorL, typename _IteratorR, typename _Container>
00875 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00876
00877 inline auto
00878 operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
00879 const __normal_iterator<_IteratorR, _Container>& __rhs)
00880 -> decltype(__lhs.base() - __rhs.base())
00881 #else
00882 inline typename __normal_iterator<_IteratorL, _Container>::difference_type
00883 operator-(const __normal_iterator<_IteratorL, _Container>& __lhs,
00884 const __normal_iterator<_IteratorR, _Container>& __rhs)
00885 #endif
00886 { return __lhs.base() - __rhs.base(); }
00887
00888 template<typename _Iterator, typename _Container>
00889 inline typename __normal_iterator<_Iterator, _Container>::difference_type
00890 operator-(const __normal_iterator<_Iterator, _Container>& __lhs,
00891 const __normal_iterator<_Iterator, _Container>& __rhs)
00892 { return __lhs.base() - __rhs.base(); }
00893
00894 template<typename _Iterator, typename _Container>
00895 inline __normal_iterator<_Iterator, _Container>
00896 operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
00897 __n, const __normal_iterator<_Iterator, _Container>& __i)
00898 { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
00899
00900 _GLIBCXX_END_NAMESPACE_VERSION
00901 }
00902
00903 #ifdef __GXX_EXPERIMENTAL_CXX0X__
00904
00905 namespace std _GLIBCXX_VISIBILITY(default)
00906 {
00907 _GLIBCXX_BEGIN_NAMESPACE_VERSION
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923 template<typename _Iterator>
00924 class move_iterator
00925 {
00926 protected:
00927 _Iterator _M_current;
00928
00929 typedef iterator_traits<_Iterator> __traits_type;
00930
00931 public:
00932 typedef _Iterator iterator_type;
00933 typedef typename __traits_type::iterator_category iterator_category;
00934 typedef typename __traits_type::value_type value_type;
00935 typedef typename __traits_type::difference_type difference_type;
00936
00937 typedef _Iterator pointer;
00938 typedef value_type&& reference;
00939
00940 move_iterator()
00941 : _M_current() { }
00942
00943 explicit
00944 move_iterator(iterator_type __i)
00945 : _M_current(__i) { }
00946
00947 template<typename _Iter>
00948 move_iterator(const move_iterator<_Iter>& __i)
00949 : _M_current(__i.base()) { }
00950
00951 iterator_type
00952 base() const
00953 { return _M_current; }
00954
00955 reference
00956 operator*() const
00957 { return std::move(*_M_current); }
00958
00959 pointer
00960 operator->() const
00961 { return _M_current; }
00962
00963 move_iterator&
00964 operator++()
00965 {
00966 ++_M_current;
00967 return *this;
00968 }
00969
00970 move_iterator
00971 operator++(int)
00972 {
00973 move_iterator __tmp = *this;
00974 ++_M_current;
00975 return __tmp;
00976 }
00977
00978 move_iterator&
00979 operator--()
00980 {
00981 --_M_current;
00982 return *this;
00983 }
00984
00985 move_iterator
00986 operator--(int)
00987 {
00988 move_iterator __tmp = *this;
00989 --_M_current;
00990 return __tmp;
00991 }
00992
00993 move_iterator
00994 operator+(difference_type __n) const
00995 { return move_iterator(_M_current + __n); }
00996
00997 move_iterator&
00998 operator+=(difference_type __n)
00999 {
01000 _M_current += __n;
01001 return *this;
01002 }
01003
01004 move_iterator
01005 operator-(difference_type __n) const
01006 { return move_iterator(_M_current - __n); }
01007
01008 move_iterator&
01009 operator-=(difference_type __n)
01010 {
01011 _M_current -= __n;
01012 return *this;
01013 }
01014
01015 reference
01016 operator[](difference_type __n) const
01017 { return std::move(_M_current[__n]); }
01018 };
01019
01020
01021
01022
01023 template<typename _IteratorL, typename _IteratorR>
01024 inline bool
01025 operator==(const move_iterator<_IteratorL>& __x,
01026 const move_iterator<_IteratorR>& __y)
01027 { return __x.base() == __y.base(); }
01028
01029 template<typename _Iterator>
01030 inline bool
01031 operator==(const move_iterator<_Iterator>& __x,
01032 const move_iterator<_Iterator>& __y)
01033 { return __x.base() == __y.base(); }
01034
01035 template<typename _IteratorL, typename _IteratorR>
01036 inline bool
01037 operator!=(const move_iterator<_IteratorL>& __x,
01038 const move_iterator<_IteratorR>& __y)
01039 { return !(__x == __y); }
01040
01041 template<typename _Iterator>
01042 inline bool
01043 operator!=(const move_iterator<_Iterator>& __x,
01044 const move_iterator<_Iterator>& __y)
01045 { return !(__x == __y); }
01046
01047 template<typename _IteratorL, typename _IteratorR>
01048 inline bool
01049 operator<(const move_iterator<_IteratorL>& __x,
01050 const move_iterator<_IteratorR>& __y)
01051 { return __x.base() < __y.base(); }
01052
01053 template<typename _Iterator>
01054 inline bool
01055 operator<(const move_iterator<_Iterator>& __x,
01056 const move_iterator<_Iterator>& __y)
01057 { return __x.base() < __y.base(); }
01058
01059 template<typename _IteratorL, typename _IteratorR>
01060 inline bool
01061 operator<=(const move_iterator<_IteratorL>& __x,
01062 const move_iterator<_IteratorR>& __y)
01063 { return !(__y < __x); }
01064
01065 template<typename _Iterator>
01066 inline bool
01067 operator<=(const move_iterator<_Iterator>& __x,
01068 const move_iterator<_Iterator>& __y)
01069 { return !(__y < __x); }
01070
01071 template<typename _IteratorL, typename _IteratorR>
01072 inline bool
01073 operator>(const move_iterator<_IteratorL>& __x,
01074 const move_iterator<_IteratorR>& __y)
01075 { return __y < __x; }
01076
01077 template<typename _Iterator>
01078 inline bool
01079 operator>(const move_iterator<_Iterator>& __x,
01080 const move_iterator<_Iterator>& __y)
01081 { return __y < __x; }
01082
01083 template<typename _IteratorL, typename _IteratorR>
01084 inline bool
01085 operator>=(const move_iterator<_IteratorL>& __x,
01086 const move_iterator<_IteratorR>& __y)
01087 { return !(__x < __y); }
01088
01089 template<typename _Iterator>
01090 inline bool
01091 operator>=(const move_iterator<_Iterator>& __x,
01092 const move_iterator<_Iterator>& __y)
01093 { return !(__x < __y); }
01094
01095
01096 template<typename _IteratorL, typename _IteratorR>
01097 inline auto
01098 operator-(const move_iterator<_IteratorL>& __x,
01099 const move_iterator<_IteratorR>& __y)
01100 -> decltype(__x.base() - __y.base())
01101 { return __x.base() - __y.base(); }
01102
01103 template<typename _Iterator>
01104 inline auto
01105 operator-(const move_iterator<_Iterator>& __x,
01106 const move_iterator<_Iterator>& __y)
01107 -> decltype(__x.base() - __y.base())
01108 { return __x.base() - __y.base(); }
01109
01110 template<typename _Iterator>
01111 inline move_iterator<_Iterator>
01112 operator+(typename move_iterator<_Iterator>::difference_type __n,
01113 const move_iterator<_Iterator>& __x)
01114 { return __x + __n; }
01115
01116 template<typename _Iterator>
01117 inline move_iterator<_Iterator>
01118 make_move_iterator(const _Iterator& __i)
01119 { return move_iterator<_Iterator>(__i); }
01120
01121
01122
01123 _GLIBCXX_END_NAMESPACE_VERSION
01124 }
01125
01126 #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) std::make_move_iterator(_Iter)
01127 #else
01128 #define _GLIBCXX_MAKE_MOVE_ITERATOR(_Iter) (_Iter)
01129 #endif // __GXX_EXPERIMENTAL_CXX0X__
01130
01131 #endif