//===----------------------------------------------------------------------===// // // 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 // move_iterator // make_move_iterator(const Iter& i); #include #include #include "test_iterators.h" template void test(It i) { const std::move_iterator r(i); assert(std::make_move_iterator(i) == r); } int main() { { char s[] = "1234567890"; test(input_iterator(s+5)); test(forward_iterator(s+5)); test(bidirectional_iterator(s+5)); test(random_access_iterator(s+5)); test(s+5); } { int a[] = {1,2,3,4}; std::make_move_iterator(a+4); std::make_move_iterator(a); // test for LWG issue 2061 } }