| //===----------------------------------------------------------------------===// |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| //===----------------------------------------------------------------------===// |
| // template<BidirectionalIterator Iter> |
| // requires HasSwap<Iter::reference, Iter::reference> |
| // reverse(Iter first, Iter last); |
| #include "test_iterators.h" |
| const unsigned sa = sizeof(ia)/sizeof(ia[0]); |
| std::reverse(Iter(ia), Iter(ia)); |
| std::reverse(Iter(ia), Iter(ia+sa)); |
| const unsigned sb = sizeof(ib)/sizeof(ib[0]); |
| std::reverse(Iter(ib), Iter(ib+sb)); |
| const unsigned sc = sizeof(ic)/sizeof(ic[0]); |
| std::reverse(Iter(ic), Iter(ic+sc)); |
| const unsigned sd = sizeof(id)/sizeof(id[0]); |
| std::reverse(Iter(id), Iter(id+sd)); |
| test<bidirectional_iterator<int*> >(); |
| test<random_access_iterator<int*> >(); |