1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 // requires RandomAccessIterator<Iter>
15 // move_iterator operator-(difference_type n) const;
20 #include "test_iterators.h"
24 test(It i, typename std::iterator_traits<It>::difference_type n, It x)
26 const std::move_iterator<It> r(i);
27 std::move_iterator<It> rr = r - n;
28 assert(rr.base() == x);
33 const char* s = "1234567890";
34 test(random_access_iterator<const char*>(s+5), 5, random_access_iterator<const char*>(s));