1 //===----------------------------------------------------------------------===// 2 // 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 6 // 7 //===----------------------------------------------------------------------===// 8 9 // <iterator> 10 11 // reverse_iterator 12 13 // reverse_iterator(); // constexpr since C++17 14 15 #include <iterator> 16 17 #include "test_macros.h" 18 #include "test_iterators.h" 19 20 template <class It> test()21TEST_CONSTEXPR_CXX17 void test() { 22 std::reverse_iterator<It> r; 23 (void)r; 24 } 25 tests()26TEST_CONSTEXPR_CXX17 bool tests() { 27 test<bidirectional_iterator<const char*> >(); 28 test<random_access_iterator<char*> >(); 29 test<char*>(); 30 test<const char*>(); 31 return true; 32 } 33 main(int,char **)34int main(int, char**) { 35 tests(); 36 #if TEST_STD_VER > 14 37 static_assert(tests(), ""); 38 #endif 39 return 0; 40 } 41