]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp
Vendor import of libc++ trunk r290819:
[FreeBSD/FreeBSD.git] / test / std / iterators / predef.iterators / move.iterators / move.iter.ops / move.iter.op.const / default.pass.cpp
1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 // <iterator>
11
12 // move_iterator
13
14 // move_iterator();
15 //
16 //  constexpr in C++17
17
18 #include <iterator>
19
20 #include "test_macros.h"
21 #include "test_iterators.h"
22
23 template <class It>
24 void
25 test()
26 {
27     std::move_iterator<It> r;
28 }
29
30 int main()
31 {
32     test<input_iterator<char*> >();
33     test<forward_iterator<char*> >();
34     test<bidirectional_iterator<char*> >();
35     test<random_access_iterator<char*> >();
36     test<char*>();
37
38 #if TEST_STD_VER > 14
39     {
40     constexpr std::move_iterator<const char *> it;
41     }
42 #endif
43 }