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 // reference operator*() const;
22 #include "test_macros.h"
31 friend bool operator==(const A& x, const A& y)
32 {return x.data_ == y.data_;}
37 test(It i, typename std::iterator_traits<It>::value_type x)
39 std::move_iterator<It> r(i);
41 typename std::iterator_traits<It>::value_type x2 = *r;
47 void operator()(void*) const {}
57 #if TEST_STD_VER >= 11
60 std::unique_ptr<int, do_nothing> p(&i);
61 test(&p, std::unique_ptr<int, do_nothing>(&i));
66 constexpr const char *p = "123456789";
67 typedef std::move_iterator<const char *> MI;
68 constexpr MI it1 = std::make_move_iterator(p);
69 constexpr MI it2 = std::make_move_iterator(p+1);
70 static_assert(*it1 == p[0], "");
71 static_assert(*it2 == p[1], "");