SeqAn3 3.2.0-rc.1
The Modern C++ library for sequence analysis.
concept.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2021, 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 <concepts>
16#include <iosfwd>
17#include <type_traits>
18
20
21namespace seqan3
22{
32template <typename stream_type, typename value_type>
33concept output_stream_over = std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
34 requires (stream_type & os, value_type & val)
35{
41
42 {os << val} -> std::same_as<std::basic_ostream<typename std::remove_reference_t<stream_type>::char_type,
44};
45
46template <typename stream_type>
47concept output_stream = requires { typename std::remove_reference_t<stream_type>::char_type; } &&
50
89
99template <typename stream_type, typename value_type>
100concept input_stream_over = std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
101 requires (stream_type & is, value_type & val)
102{
108
109
110 {is >> val} -> std::same_as<std::basic_istream<typename std::remove_reference_t<stream_type>::char_type,
112};
113
114template <typename stream_type>
115concept input_stream = requires { typename std::remove_reference_t<stream_type>::char_type; } &&
118
157
158} // namespace seqan3
Concept for input streams.
Concept for output streams.
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
Provides platform and dependency checks.