diff options
Diffstat (limited to 'libcxx/test')
| -rw-r--r-- | libcxx/test/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp | 2 | ||||
| -rw-r--r-- | libcxx/test/support/test_iterators.h | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp b/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp index fb3765d2030..0b348e6920c 100644 --- a/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp +++ b/libcxx/test/containers/sequences/forwardlist/forwardlist.cons/assign_range.pass.cpp @@ -70,7 +70,7 @@ int main() typedef input_iterator<const T*> I; c.assign(I(std::begin(t0)), I(std::end(t0))); int n = 0; - for (C::const_iterator i = c.cbegin(); i != c.cend(); ++i, ++n) + for (C::const_iterator i = c.cbegin(); i != c.cend(); ++i, (void) ++n) assert(*i == 10+n); assert(n == 4); } diff --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h index cf164be806d..71509083e13 100644 --- a/libcxx/test/support/test_iterators.h +++ b/libcxx/test/support/test_iterators.h @@ -38,6 +38,9 @@ public: output_iterator& operator++() {++it_; return *this;} output_iterator operator++(int) {output_iterator tmp(*this); ++(*this); return tmp;} + + template <class T> + void operator,(T const &); }; template <class It> @@ -71,6 +74,9 @@ public: {return x.it_ == y.it_;} friend bool operator!=(const input_iterator& x, const input_iterator& y) {return !(x == y);} + + template <class T> + void operator,(T const &); }; template <class T, class U> @@ -120,6 +126,9 @@ public: {return x.it_ == y.it_;} friend bool operator!=(const forward_iterator& x, const forward_iterator& y) {return !(x == y);} + + template <class T> + void operator,(T const &); }; template <class T, class U> @@ -168,6 +177,9 @@ public: bidirectional_iterator& operator--() {--it_; return *this;} bidirectional_iterator operator--(int) {bidirectional_iterator tmp(*this); --(*this); return tmp;} + + template <class T> + void operator,(T const &); }; template <class T, class U> @@ -227,6 +239,9 @@ public: {random_access_iterator tmp(*this); tmp -= n; return tmp;} reference operator[](difference_type n) const {return it_[n];} + + template <class T> + void operator,(T const &); }; template <class T, class U> |

