SeqAn3  3.0.1
The Modern C++ library for sequence analysis.
to_char.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
17 #include <seqan3/std/ranges>
18 
19 namespace seqan3::views
20 {
21 
65 inline auto const to_char = deep{std::views::transform([] (auto const in) noexcept
66 {
67  static_assert(alphabet<remove_cvref_t<decltype(in)>>, "The value type of seqan3::views::to_char must model the seqan3::alphabet.");
68  return seqan3::to_char(in);
69 })};
70 
72 
73 } // namespace seqan3::views
seqan3::views
The SeqAn namespace for views.
Definition: view_to_simd.hpp:672
seqan3::views::to_char
const auto to_char
A view that calls seqan3::to_char() on each element in the input range.
Definition: to_char.hpp:65
seqan3::to_char
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:320
seqan3::views::deep
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view.
Definition: deep.hpp:101
ranges
Adaptations of concepts from the Ranges TS.
deep.hpp
Provides seqan3::views::deep.
alphabet
The generic alphabet concept that covers most data types used in ranges.
std::remove_cv_t
seqan3::pack_traits::transform
seqan3::type_list< trait_t< pack_t >... > transform
Apply a transformation trait to every type in the pack and return a seqan3::type_list of the results.
Definition: traits.hpp:307
concept.hpp
Core alphabet concept and free function/type trait wrappers.