1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
13 // iterator_type base() const; // constexpr since C++17
18 #include "test_macros.h"
19 #include "test_iterators.h"
21 TEST_CONSTEXPR_CXX17
bool test() {
22 typedef bidirectional_iterator
<int*> Iter
;
25 std::reverse_iterator
<Iter
> const reverse(iter
);
26 std::reverse_iterator
<Iter
>::iterator_type base
= reverse
.base();
27 assert(base
== Iter(&i
));
31 int main(int, char**) {
34 static_assert(test(), "");