31namespace seqan3::detail
36template <
typename type>
37constexpr bool is_uint_adaptation_v = std::same_as<type, uint8_t> ||
38 std::same_as<type, uint16_t> ||
39 std::same_as<type, uint32_t>;
51template <
typename u
int_type>
53 requires seqan3::detail::is_uint_adaptation_v<uint_type>
70 static constexpr auto to_char(uint_type
const uint_v)
noexcept
72 if constexpr (std::same_as<uint_type, uint8_t>)
73 return static_cast<char>(uint_v);
74 else if constexpr (std::same_as<uint_type, uint16_t>)
75 return static_cast<char16_t
>(uint_v);
77 return static_cast<char32_t
>(uint_v);
86 static constexpr uint_type
to_rank(uint_type
const uint_v)
noexcept
98 static constexpr uint_type &
assign_char_to(
decltype(
to_char(uint_type{}))
const chr, uint_type & uint_v)
noexcept
110 static constexpr uint_type &
assign_rank_to(uint_type
const uint2_v, uint_type & uint_v)
noexcept
112 return uint_v = uint2_v;
Core alphabet concept and free function/type trait wrappers.
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:387
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition: concept.hpp:861
Provides metaprogramming utilities for integer types.
A namespace for third party and standard library specialisations of SeqAn customisation points.
Definition: char.hpp:44
static constexpr uint_type & assign_rank_to(uint_type const uint2_v, uint_type &uint_v) noexcept
Assign a rank to the uint (same as calling =).
Definition: uint.hpp:110
static constexpr auto to_char(uint_type const uint_v) noexcept
Converting uint to char casts to a character type of same size.
Definition: uint.hpp:70
static constexpr uint_type to_rank(uint_type const uint_v) noexcept
Converting uint to rank is a no-op (it will just return the value you pass in).
Definition: uint.hpp:86
static constexpr uint_type & assign_char_to(decltype(to_char(uint_type{})) const chr, uint_type &uint_v) noexcept
Assign from a character type via implicit or explicit cast.
Definition: uint.hpp:98
A type that can be specialised to provide customisation point implementations so that third party typ...
Definition: concept.hpp:49