SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
to_char.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2021, 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
15#include <seqan3/std/ranges>
16
19
20namespace seqan3::views
21{
63inline auto const to_char = deep{std::views::transform([] (auto const in) noexcept
64{
65 static_assert(alphabet<std::remove_cvref_t<decltype(in)>>, "The value type of seqan3::views::to_char must model the seqan3::alphabet.");
66 return seqan3::to_char(in);
67})};
68
69} // namespace seqan3::views
Core alphabet concept and free function/type trait wrappers.
A wrapper type around an existing view adaptor that enables "deep view" behaviour for that view.
Definition: deep.hpp:104
Provides seqan3::views::deep.
auto const to_char
A view that calls seqan3::to_char() on each element in the input range.
Definition: to_char.hpp:63
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:387
decltype(detail::transform< trait_t >(list_t{})) transform
Apply a transformation trait to every type in the list and return a seqan3::type_list of the results.
Definition: traits.hpp:471
The generic alphabet concept that covers most data types used in ranges.
The SeqAn namespace for views.
Definition: char_to.hpp:22
The <ranges> header from C++20's standard library.