tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
legacy_bidirectional_iterator.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2024 Tobias Hienzsch
3
4#ifndef TETL_CONCEPTS_LEGACY_BIDIRECTIONAL_ITERATOR_HPP
5#define TETL_CONCEPTS_LEGACY_BIDIRECTIONAL_ITERATOR_HPP
6
7#include <etl/_concepts/convertible_to.hpp>
8#include <etl/_concepts/same_as.hpp>
9#include <etl/_iterator/iter_reference_t.hpp>
10#include <etl/_iterator/legacy_forward_iterator.hpp>
11
12namespace etl {
13
14/// \note Non-standard extension
15/// \headerfile etl/iterator.hpp
16/// \ingroup iterator
17template <typename Iter>
18concept legacy_bidirectional_iterator = etl::legacy_forward_iterator<Iter> and requires(Iter i) {
19 { --i } -> etl::same_as<Iter&>;
20 { i-- } -> etl::convertible_to<Iter const&>;
21 { *i-- } -> etl::same_as<etl::iter_reference_t<Iter>>;
22};
23
24} // namespace etl
25
26#endif // TETL_CONCEPTS_LEGACY_BIDIRECTIONAL_ITERATOR_HPP
Definition adjacent_find.hpp:9