Kaynağa Gözat

Since Eric poisoned the comma operator on all our test iterators, we no longer need 'comma_iterator'. Remove it from the test suite.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@222238 91177308-0d34-0410-b5e6-96231b3b80d8
Marshall Clow 10 yıl önce
ebeveyn
işleme
e52b63237a
1 değiştirilmiş dosya ile 0 ekleme ve 105 silme
  1. 0 105
      test/support/test_iterators.h

+ 0 - 105
test/support/test_iterators.h

@@ -306,108 +306,6 @@ operator-(const random_access_iterator<T>& x, const random_access_iterator<U>& y
     return x.base() - y.base();
     return x.base() - y.base();
 }
 }
 
 
-template <class It>
-class comma_iterator
-{
-    It it_;
-
-    template <class U> friend class comma_iterator;
-public:
-    typedef          std::random_access_iterator_tag           iterator_category;
-    typedef typename std::iterator_traits<It>::value_type      value_type;
-    typedef typename std::iterator_traits<It>::difference_type difference_type;
-    typedef It                                                 pointer;
-    typedef typename std::iterator_traits<It>::reference       reference;
-
-    It base() const {return it_;}
-
-    comma_iterator() : it_() {}
-    explicit comma_iterator(It it) : it_(it) {}
-   template <class U>
-        comma_iterator(const comma_iterator<U>& u) :it_(u.it_) {}
-
-    reference operator*() const {return *it_;}
-    pointer operator->() const {return it_;}
-
-    comma_iterator& operator++() {++it_; return *this;}
-    comma_iterator operator++(int)
-        {comma_iterator tmp(*this); ++(*this); return tmp;}
-
-    comma_iterator& operator--() {--it_; return *this;}
-    comma_iterator operator--(int)
-        {comma_iterator tmp(*this); --(*this); return tmp;}
-
-    comma_iterator& operator+=(difference_type n) {it_ += n; return *this;}
-    comma_iterator operator+(difference_type n) const
-        {comma_iterator tmp(*this); tmp += n; return tmp;}
-    friend comma_iterator operator+(difference_type n, comma_iterator x)
-        {x += n; return x;}
-    comma_iterator& operator-=(difference_type n) {return *this += -n;}
-    comma_iterator operator-(difference_type n) const
-        {comma_iterator tmp(*this); tmp -= n; return tmp;}
-
-    reference operator[](difference_type n) const {return it_[n];}
-    template <typename T>
-    void operator,(const T &) { assert(false); }
-};
-
-template <class T, class U>
-inline
-bool
-operator==(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return x.base() == y.base();
-}
-
-template <class T, class U>
-inline
-bool
-operator!=(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return !(x == y);
-}
-
-template <class T, class U>
-inline
-bool
-operator<(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return x.base() < y.base();
-}
-
-template <class T, class U>
-inline
-bool
-operator<=(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return !(y < x);
-}
-
-template <class T, class U>
-inline
-bool
-operator>(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return y < x;
-}
-
-template <class T, class U>
-inline
-bool
-operator>=(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return !(x < y);
-}
-
-template <class T, class U>
-inline
-typename std::iterator_traits<T>::difference_type
-operator-(const comma_iterator<T>& x, const comma_iterator<U>& y)
-{
-    return x.base() - y.base();
-}
-
-
 template <class Iter>
 template <class Iter>
 inline Iter base(output_iterator<Iter> i) { return i.base(); }
 inline Iter base(output_iterator<Iter> i) { return i.base(); }
 
 
@@ -423,9 +321,6 @@ inline Iter base(bidirectional_iterator<Iter> i) { return i.base(); }
 template <class Iter>
 template <class Iter>
 inline Iter base(random_access_iterator<Iter> i) { return i.base(); }
 inline Iter base(random_access_iterator<Iter> i) { return i.base(); }
 
 
-template <class Iter>
-inline Iter base(comma_iterator<Iter> i) { return i.base(); }
-
 template <class Iter>    // everything else
 template <class Iter>    // everything else
 inline Iter base(Iter i) { return i; }
 inline Iter base(Iter i) { return i; }