SeqAn3  3.0.0
The Modern C++ library for sequence analysis.
concept.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2019, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2019, 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 <ios>
16 #include <type_traits>
17 
18 #include <seqan3/core/platform.hpp>
19 
20 namespace seqan3
21 {
30 template <typename stream_type, typename value_type>
32 SEQAN3_CONCEPT OStream = std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
33  requires (stream_type & os, value_type & val)
34 {
40 
43 };
44 
45 template <typename stream_type>
46 SEQAN3_CONCEPT OStream2 = requires { typename std::remove_reference_t<stream_type>::char_type; } &&
49 
87 
97 template <typename stream_type, typename value_type>
99 SEQAN3_CONCEPT IStream = std::is_base_of_v<std::ios_base, std::remove_reference_t<stream_type>> &&
100  requires (stream_type & is, value_type & val)
101 {
107 
110 };
111 
112 template <typename stream_type>
113 SEQAN3_CONCEPT IStream2 = requires { typename std::remove_reference_t<stream_type>::char_type; } &&
116 
154 
165 template <typename stream_type, typename value_type>
167 SEQAN3_CONCEPT Stream = OStream<stream_type, value_type> &&
168  IStream<stream_type, value_type>;
169 
171 
172 } // namespace seqan3
Provides platform and dependency checks.
typename stream::char_type char_type
Declares the associated char type.
The main SeqAn3 namespace.
typename stream::char_type char_type
Declares the associated char type.