Loading...
Searching...
No Matches
char_to.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 <ranges>
#include <seqan3/alphabet/concept.hpp>
#include <seqan3/utility/type_traits/basic.hpp>
#include <seqan3/utility/views/deep.hpp>
namespace seqan3::views
{
template <alphabet alphabet_type>
inline auto const char_to = deep{std::views::transform(
[](auto && in)
{
static_assert(
std::common_reference_with<decltype(in), alphabet_char_t<alphabet_type>>,
"The innermost value type must have a common reference to underlying char type of alphabet_type.");
// call element-wise assign_char from the alphabet
return assign_char_to(in, alphabet_type{});
})};
} // namespace seqan3::views
concept.hpp
Core alphabet concept and free function/type trait wrappers.
basic.hpp
Provides various type traits on generic types.
seqan3::views::deep
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view.
Definition deep.hpp:101
deep.hpp
Provides seqan3::views::deep.
seqan3::views::char_to
auto const char_to
A view over an alphabet, given a range of characters.
Definition char_to.hpp:64
seqan3::assign_char_to
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition alphabet/concept.hpp:517
seqan3::alphabet_char_t
decltype(seqan3::to_char(std::declval< alphabet_type const >())) alphabet_char_t
The char_type of the alphabet; defined as the return type of seqan3::to_char.
Definition alphabet/concept.hpp:393
seqan3::views
The SeqAn namespace for views.
Definition char_strictly_to.hpp:19
Hide me