SeqAn3 3.2.0
The Modern C++ library for sequence analysis.
concept.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2022, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2022, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6// -----------------------------------------------------------------------------------------------------
7
13#pragma once
14
15#include <ranges>
16
18
19namespace seqan3
20{
43template <typename type>
45 std::ranges::input_range<std::remove_const_t<type>> && std::ranges::input_range<type const>
46 && (std::ranges::forward_range<std::remove_const_t<type>> == std::ranges::forward_range<type const>)
47 && (std::ranges::bidirectional_range<std::remove_const_t<type>> == std::ranges::bidirectional_range<type const>)
48 && (std::ranges::random_access_range<std::remove_const_t<type>> == std::ranges::random_access_range<type const>);
50
83template <typename iterator_t>
84concept pseudo_random_access_iterator = std::forward_iterator<iterator_t> && !
85std::is_base_of_v<std::random_access_iterator_tag, typename std::iterator_traits<iterator_t>::iterator_category> &&
86 std::totally_ordered<iterator_t> &&
87 std::sized_sentinel_for<iterator_t, iterator_t> && requires (iterator_t i,
88 iterator_t const j,
90 requires std::same_as<decltype(i += n), iterator_t &>;
91 requires std::same_as<decltype(j + n), iterator_t>;
92 requires std::same_as<decltype(n + j), iterator_t>;
93 requires std::same_as<decltype(--i), iterator_t &>;
94 requires std::same_as<decltype(i--), iterator_t>;
95 requires std::same_as<decltype(i -= n), iterator_t &>;
96 requires std::same_as<decltype(j - n), iterator_t>;
97 requires std::same_as<decltype(j[n]),
99 };
101
118template <typename rng_t>
120 std::ranges::forward_range<rng_t> && pseudo_random_access_iterator<std::ranges::iterator_t<rng_t>>;
122} // namespace seqan3
Specifies requirements of an input range type for which the const version of that type satisfies the ...
This concept checks if an iterator type models pseudo random access.
This concept checks if a type models a pseudo random access range.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides platform and dependency checks.