1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // UNSUPPORTED: c++98, c++03, c++11
15 // template <class Iterator>
16 // constexpr reverse_iterator<Iterator>
17 // make_reverse_iterator(Iterator i);
24 #include "test_macros.h"
25 #include "test_iterators.h"
31 const std::reverse_iterator<It> r = std::make_reverse_iterator(i);
32 assert(r.base() == i);
37 const char* s = "1234567890";
38 random_access_iterator<const char*>b(s);
39 random_access_iterator<const char*>e(s+10);
45 constexpr const char *p = "123456789";
46 constexpr auto it1 = std::make_reverse_iterator(p);
47 static_assert(it1.base() == p, "");