Provides alphabet adaptations for standard char types. More...
Go to the source code of this file.
Namespaces | |
namespace | bio |
The main BioC++ namespace. | |
namespace | bio::alphabet |
The alphabet module's namespace. | |
namespace | bio::alphabet::custom |
A namespace for third party and standard library specialisations of BioC++ customisation points. | |
Functions | |
Adapt builtin character types as alphabets. | |
These overloads make | |
template<bio::meta::nonint_character char_type> | |
constexpr char_type & | bio::alphabet::custom::tag_invoke (assign_char_to tag, char_type const chr2, char_type &chr) noexcept |
Assign a char to the char type (same as calling = ). | |
template<bio::meta::nonint_character char_type> | |
constexpr char_type & | bio::alphabet::custom::tag_invoke (assign_rank_to tag, decltype(tag_invoke(to_rank{}, char_type{})) const rank, char_type &chr) noexcept |
Assigning a rank to a char is the same as assigning it a numeric value. | |
template<bio::meta::nonint_character char_type> | |
consteval auto | bio::alphabet::custom::tag_invoke (size, char_type const) noexcept |
The number of values the char type can take (e.g. 256 for char ). | |
template<bio::meta::nonint_character char_type> | |
constexpr char_type | bio::alphabet::custom::tag_invoke (to_char tag, char_type const chr) noexcept |
Converting char to char is no-op (it will just return the value you pass in). | |
template<bio::meta::nonint_character char_type> | |
constexpr auto | bio::alphabet::custom::tag_invoke (to_rank tag, char_type const chr) noexcept |
Convert char to rank by casting to an unsigned integral type of same size. | |
Provides alphabet adaptations for standard char types.
This file provides function and type trait overloads so that the following types fulfil the bio::alphabet::alphabet:
char
char16_t
char32_t
You will likely not use these interfaces directly, they are, however, very helpful for conversions between other alphabets and between other alphabets and characters.
signed char
and unsigned char
are absent from the list, because of their type ambiguity with int8_t
and uint8_t
.