1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 // template<BidirectionalIterator Iter>
12 // requires HasSwap<Iter::reference, Iter::reference>
14 // reverse(Iter first, Iter last);
19 #include "test_macros.h"
20 #include "test_iterators.h"
27 const unsigned sa
= sizeof(ia
)/sizeof(ia
[0]);
28 std::reverse(Iter(ia
), Iter(ia
));
30 std::reverse(Iter(ia
), Iter(ia
+sa
));
34 const unsigned sb
= sizeof(ib
)/sizeof(ib
[0]);
35 std::reverse(Iter(ib
), Iter(ib
+sb
));
40 const unsigned sc
= sizeof(ic
)/sizeof(ic
[0]);
41 std::reverse(Iter(ic
), Iter(ic
+sc
));
46 int id
[] = {0, 1, 2, 3};
47 const unsigned sd
= sizeof(id
)/sizeof(id
[0]);
48 std::reverse(Iter(id
), Iter(id
+sd
));
57 test
<bidirectional_iterator
<int*> >();
58 test
<random_access_iterator
<int*> >();