Home | History | Annotate | Download | only in reverse.iter.cons
      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 }
     29 
     30 int main()
     31 {
     32     test<bidirectional_iterator<const char*> >();
     33     test<random_access_iterator<char*> >();
     34     test<char*>();
     35     test<const char*>();
     36 
     37 #if TEST_STD_VER > 14
     38     {
     39         constexpr std::reverse_iterator<const char *> it;
     40     }
     41 #endif
     42 }
     43