SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
optional.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 <optional>
13
17
18namespace seqan3
19{
29template <typename char_t>
31{
32 s << "<VALUELESS_OPTIONAL>";
33 return s;
34}
35
42template <typename char_t, typename optional_type>
43 requires detail::is_type_specialisation_of_v<std::remove_cvref_t<optional_type>, std::optional>
44inline debug_stream_type<char_t> & operator<<(debug_stream_type<char_t> & s, optional_type && arg)
45{
46 if (arg.has_value())
47 s << *arg;
48 else
49 s << "<VALUELESS_OPTIONAL>";
50 return s;
51}
52
54
55} // namespace seqan3
Provides various type traits on generic types.
A "pretty printer" for most SeqAn data structures and related types.
Definition debug_stream_type.hpp:75
Provides seqan3::debug_stream and related types.
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
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides type traits for working with templates.
Hide me