default.pass.cpp (881B)
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 // reverse_iterator 13 14 // constexpr reverse_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::reverse_iterator<It> r; 28 (void)r; 29 } 30 31 int main() 32 { 33 test<bidirectional_iterator<const char*> >(); 34 test<random_access_iterator<char*> >(); 35 test<char*>(); 36 test<const char*>(); 37 38 #if TEST_STD_VER > 14 39 { 40 constexpr std::reverse_iterator<const char *> it; 41 (void)it; 42 } 43 #endif 44 }