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