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// UNSUPPORTED: c++03, c++11, c++14, c++17
10
11// template<class In>
12// concept indirectly_readable;
13
14#include <iterator>
15
16#include <concepts>
17#include <memory>
18#include <optional>
19
20#include "../incrementable.h"
21
22static_assert(std::incrementable<int>);
23static_assert(std::incrementable<int*>);
24static_assert(std::incrementable<int**>);
25
26static_assert(!std::incrementable<postfix_increment_returns_void>);
27static_assert(!std::incrementable<postfix_increment_returns_copy>);
28static_assert(!std::incrementable<has_integral_minus>);
29static_assert(!std::incrementable<has_distinct_difference_type_and_minus>);
30static_assert(!std::incrementable<missing_difference_type>);
31static_assert(!std::incrementable<floating_difference_type>);
32static_assert(!std::incrementable<non_const_minus>);
33static_assert(!std::incrementable<non_integral_minus>);
34static_assert(!std::incrementable<bad_difference_type_good_minus>);
35static_assert(!std::incrementable<not_default_initializable>);
36static_assert(!std::incrementable<not_movable>);
37static_assert(!std::incrementable<preinc_not_declared>);
38static_assert(!std::incrementable<postinc_not_declared>);
39static_assert(std::incrementable<incrementable_with_difference_type>);
40static_assert(std::incrementable<incrementable_without_difference_type>);
41static_assert(std::incrementable<difference_type_and_void_minus>);
42static_assert(!std::incrementable<noncopyable_with_difference_type>);
43static_assert(!std::incrementable<noncopyable_without_difference_type>);
44static_assert(!std::incrementable<noncopyable_with_difference_type_and_minus>);
45

source code of libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.inc/incrementable.compile.pass.cpp