//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // move_iterator // template // requires HasEqualTo // bool // operator!=(const move_iterator& x, const move_iterator& y); #include #include #include "test_iterators.h" template void test(It l, It r, bool x) { const std::move_iterator r1(l); const std::move_iterator r2(r); assert((r1 != r2) == x); } int main() { char s[] = "1234567890"; test(input_iterator(s), input_iterator(s), false); test(input_iterator(s), input_iterator(s+1), true); test(forward_iterator(s), forward_iterator(s), false); test(forward_iterator(s), forward_iterator(s+1), true); test(bidirectional_iterator(s), bidirectional_iterator(s), false); test(bidirectional_iterator(s), bidirectional_iterator(s+1), true); test(random_access_iterator(s), random_access_iterator(s), false); test(random_access_iterator(s), random_access_iterator(s+1), true); test(s, s, false); test(s, s+1, true); }