Loading...
Searching...
No Matches
tuple.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <concepts>
#include <ranges>
#include <seqan3/alphabet/concept.hpp>
#include <seqan3/core/debug_stream/debug_stream_type.hpp>
#include <seqan3/utility/tuple/concept.hpp>
namespace seqan3
{
} // namespace seqan3
namespace seqan3::detail
{
template <typename char_t, typename tuple_t, std::size_t... I>
void print_tuple(debug_stream_type<char_t> & s, tuple_t && t, std::index_sequence<I...> const &)
{
using std::get;
s << '(';
((s << (I == 0 ? "" : ",") << get<I>(t)), ...);
s << ')';
}
} // namespace seqan3::detail
namespace seqan3
{
template <tuple_like tuple_t>
struct tuple_printer<tuple_t>
{
template <typename stream_t, typename arg_t>
constexpr void operator()(stream_t & stream, arg_t && arg) const
{
detail::print_tuple(stream, std::forward<arg_t>(arg), std::make_index_sequence<std::tuple_size_v<tuple_t>>{});
}
};
} // namespace seqan3
concept.hpp
Core alphabet concept and free function/type trait wrappers.
debug_stream_type.hpp
Provides seqan3::debug_stream and related types.
std::forward
T forward(T... args)
std::make_index_sequence
seqan3
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
seqan3::get
constexpr auto const & get(configuration< configs_t... > const &config) noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition configuration.hpp:412
seqan3::tuple_printer< tuple_t >::operator()
constexpr void operator()(stream_t &stream, arg_t &&arg) const
Prints a tuple to a formatted output stream.
Definition tuple.hpp:62
seqan3::tuple_printer
Definition default_printer.hpp:51
std::tuple_size_v
T tuple_size_v
concept.hpp
Provides seqan3::tuple_like.
Hide me