SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
char_to.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 <ranges>
13
17
18namespace seqan3::views
19{
63template <alphabet alphabet_type>
64inline auto const char_to = deep{std::views::transform(
65 [](auto && in)
66 {
67 static_assert(
68 std::common_reference_with<decltype(in), alphabet_char_t<alphabet_type>>,
69 "The innermost value type must have a common reference to underlying char type of alphabet_type.");
70 // call element-wise assign_char from the alphabet
71 return assign_char_to(in, alphabet_type{});
72 })};
73
74} // namespace seqan3::views
Core alphabet concept and free function/type trait wrappers.
Provides various type traits on generic types.
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view.
Definition deep.hpp:101
Provides seqan3::views::deep.
auto const char_to
A view over an alphabet, given a range of characters.
Definition char_to.hpp:64
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition alphabet/concept.hpp:521
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:397
The SeqAn namespace for views.
Definition char_strictly_to.hpp:19
Hide me