SeqAn3
3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
variant.hpp
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
10
#pragma once
11
12
#include <
variant
>
13
14
#include <
seqan3/core/debug_stream/debug_stream_type.hpp
>
15
#include <
seqan3/core/detail/template_inspection.hpp
>
16
#include <
seqan3/utility/type_traits/basic.hpp
>
17
18
namespace
seqan3
19
{
33
template
<
typename
char
_t,
typename
variant_type>
34
requires
detail::is_type_specialisation_of_v<std::remove_cvref_t<variant_type>,
std::variant
>
35
inline
debug_stream_type<char_t>
&
operator<<
(
debug_stream_type<char_t>
& s, variant_type && v)
36
{
37
if
(!v.valueless_by_exception())
38
std::visit
(
39
[&s](
auto
&& arg)
40
{
41
s << arg;
42
},
43
v);
44
else
45
s <<
"<VALUELESS_VARIANT>"
;
46
return
s;
47
}
48
50
51
}
// namespace seqan3
basic.hpp
Provides various type traits on generic types.
seqan3::debug_stream_type
A "pretty printer" for most SeqAn data structures and related types.
Definition
debug_stream_type.hpp:75
debug_stream_type.hpp
Provides seqan3::debug_stream and related types.
seqan3::operator<<
debug_stream_type< char_t > & operator<<(debug_stream_type< char_t > &stream, alignment_t &&alignment)
Stream operator for alignments, which are represented as tuples of aligned sequences.
Definition
debug_stream_alignment.hpp:107
seqan3
The main SeqAn3 namespace.
Definition
aligned_sequence_concept.hpp:26
template_inspection.hpp
Provides type traits for working with templates.
variant
std::visit
T visit(T... args)
Hide me
Version:
seqan3
core
debug_stream
variant.hpp
Generated on Tue May 28 2024 17:02:06 for SeqAn3 by
1.9.8