SeqAn3
3.0.1
The Modern C++ library for sequence analysis.
debug_stream_optional.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3
// Copyright (c) 2016-2020, 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 <
optional
>
16
17
#include <
seqan3/core/detail/debug_stream_type.hpp
>
18
#include <
seqan3/core/type_traits/template_inspection.hpp
>
19
20
namespace
seqan3
21
{
31
template
<
typename
optional_type,
typename
char
_t>
33
requires
std::same_as<remove_cvref_t<optional_type>
,
std::nullopt_t
>
35
inline
debug_stream_type<char_t>
&
operator<<
(
debug_stream_type<char_t>
& s, optional_type && SEQAN3_DOXYGEN_ONLY(arg))
36
{
37
s <<
"<VALUELESS_OPTIONAL>"
;
38
return
s;
39
}
40
47
template
<
typename
optional_type,
typename
char
_t>
49
requires detail::is_type_specialisation_of_v<remove_cvref_t<optional_type>,
std::optional
>
51
inline
debug_stream_type<char_t>
&
operator<<
(
debug_stream_type<char_t>
& s, optional_type && arg)
52
{
53
if
(arg.has_value())
54
s << *arg;
55
else
56
s <<
"<VALUELESS_OPTIONAL>"
;
57
return
s;
58
}
59
61
62
}
// namespace seqan3
template_inspection.hpp
Provides seqan3::type_list and auxiliary type traits.
debug_stream_type.hpp
Provides seqan3::debug_stream and related types.
seqan3::debug_stream_type
A "pretty printer" for most SeqAn data structures and related types.
Definition:
debug_stream_type.hpp:70
same_as
The concept std::same_as<T, U> is satisfied if and only if T and U denote the same type.
seqan3
The main SeqAn3 namespace.
Definition:
aligned_sequence_concept.hpp:36
seqan3::operator<<
debug_stream_type< char_t > & operator<<(debug_stream_type< char_t > &stream, tuple_t const &alignment)
Stream operator for alignments, which are represented as tuples of aligned sequences.
Definition:
aligned_sequence_concept.hpp:559
std::nullopt_t
optional
seqan3
core
detail
debug_stream_optional.hpp
Generated on Tue Feb 18 2020 09:33:19 for SeqAn3 by
1.8.16