71 namespace seqan3::detail::adl_only
75 template <
typename ...args_t>
88 template <typename alph_t>
90 requires requires (alph_t const a)
151 template <
typename semi_alphabet_type>
153 requires requires { {
seqan3::to_rank(std::declval<semi_alphabet_type>()) }; }
163 namespace seqan3::detail::adl_only
167 template <
typename ...args_t>
181 template <typename alph_t>
252 namespace seqan3::detail::adl_only
256 template <
typename ...args_t>
266 using base_t::base_t;
272 template <
typename alphabet_t>
282 template <
typename alphabet_t>
292 template <
typename alphabet_t>
295 std::forward<alphabet_t>(
alphabet).to_char()
351 template <
typename alphabet_type>
363 namespace seqan3::detail::adl_only
367 template <
typename ...args_t>
381 template <
typename alph_t>
444 inline constexpr
auto assign_char_to = detail::adl_only::assign_char_to_fn{};
452 namespace seqan3::detail::adl_only
456 template <
typename ...args_t>
463 template <
typename alph_t>
479 template <
typename dummy =
int>
547 template <
typename alph_t>
549 requires requires { {
to_char(std::declval<alph_t>()) }; }
551 inline constexpr
auto char_is_valid_for = detail::adl_only::char_is_valid_for_fn<alph_t>{};
559 namespace seqan3::detail::adl_only
567 template <
typename alphabet_t>
573 std::convertible_to, alphabet_t);
578 if (!seqan3::char_is_valid_for<alphabet_t>(chr))
623 namespace seqan3::detail::adl_only
627 template <
typename ...args_t>
634 template <
typename alph_t>
640 seqan3::is_constexpr_default_constructible_v<std::remove_cvref_t<alph_t>>,
650 template <
typename dummy =
int>
664 "Only overloads that are marked constexpr are picked up by seqan3::alphabet_size.");
669 #if SEQAN3_WORKAROUND_GCC_89953
670 template <
typename alph_t>
671 requires requires { { alphabet_size_fn<alph_t>{} }; }
672 inline constexpr
auto alphabet_size_obj = alphabet_size_fn<alph_t>{};
720 #if SEQAN3_WORKAROUND_GCC_89953
721 template <
typename alph_t>
724 requires { { detail::adl_only::alphabet_size_obj<alph_t>() }; }
726 inline constexpr
auto alphabet_size = detail::adl_only::alphabet_size_obj<alph_t>();
728 template <
typename alph_t>
730 requires requires { { detail::adl_only::alphabet_size_fn<alph_t>{}() }; }
732 inline constexpr
auto alphabet_size = detail::adl_only::alphabet_size_fn<alph_t>{}();
781 template <
typename t>
783 std::totally_ordered<t> &&
784 std::copy_constructible<t> &&
785 std::is_nothrow_copy_constructible_v<t> &&
788 { seqan3::alphabet_size<t> };
832 template <
typename t>
871 template <
typename t>
919 template <
typename t>
951 template <cereal_output_archive archive_t, semialphabet alphabet_t>
970 template <cereal_input_archive archive_t,
typename wrapped_alphabet_t>
972 wrapped_alphabet_t && l,
973 alphabet_rank_t<detail::strip_cereal_wrapper_t<wrapped_alphabet_t>>
const & r)
976 assign_rank_to(r,
static_cast<detail::strip_cereal_wrapper_t<wrapped_alphabet_t> &
>(l));
999 template <
typename t>
1021 template <
typename t>
1043 template <
typename t>
1066 template <
typename t>
Exceptions thrown by entities in the alphabet module.
Adaptions of concepts from the Cereal library.
Helper utilities for defining customisation point objects (CPOs).
#define SEQAN3_CPO_IMPL(PRIO, TERM)
A macro that helps defining the overload set of a customisation point.
Definition: customisation_point.hpp:47
#define SEQAN3_CPO_OVERLOAD(...)
A macro that helps to define a seqan3::detail::customisation_point_object.
Definition: customisation_point.hpp:113
Provides concepts for core language types and relations that don't have concepts in C++20 (yet).
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition: concept.hpp:435
constexpr auto to_char
Return the char representation of an alphabet object.
Definition: concept.hpp:334
decltype(seqan3::to_rank(std::declval< semi_alphabet_type >())) alphabet_rank_t
The rank_type of the semi-alphabet; defined as the return type of seqan3::to_rank.
Definition: concept.hpp:155
constexpr auto alphabet_size
A type trait that holds the size of a (semi-)alphabet.
Definition: concept.hpp:723
constexpr auto assign_rank_to
Assign a rank to an alphabet object.
Definition: concept.hpp:244
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: concept.hpp:346
constexpr auto char_is_valid_for
Returns whether a character is in the valid set of a seqan3::alphabet (usually implies a bijective ma...
Definition: concept.hpp:542
constexpr auto assign_char_strictly_to
Assign a character to an alphabet object, throw if the character is not valid.
Definition: concept.hpp:606
constexpr auto to_rank
Return the rank representation of a (semi-)alphabet object.
Definition: concept.hpp:146
typename deferred_type< t, dependent_ts... >::type deferred_type_t
Return the type identity; further arguments are ignored, but can make this type dependent if they are...
Definition: basic.hpp:134
#define SEQAN3_IS_CONSTEXPR(...)
Returns true if the expression passed to this macro can be evaluated at compile time,...
Definition: basic.hpp:28
The generic alphabet concept that covers most data types used in ranges.
A seqan3::alphabet that has constexpr accessors.
A seqan3::semialphabet that has constexpr accessors.
A seqan3::writable_alphabet that has constexpr accessors.
A seqan3::writable_semialphabet that has a constexpr assignment.
The basis for seqan3::alphabet, but requires only rank interface (not char).
Refines seqan3::alphabet and adds assignability.
A refinement of seqan3::semialphabet that adds assignability.
A namespace for third party and standard library specialisations of SeqAn customisation points.
Definition: char.hpp:44
The internal SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
A type that can be specialised to provide customisation point implementations so that third party typ...
Definition: concept.hpp:49
Functor definition used indirectly by for seqan3::detail::alphabet_size.
Definition: concept.hpp:627
std::conditional_t< std::is_nothrow_default_constructible_v< std::remove_cvref_t< alph_t > > &&seqan3::is_constexpr_default_constructible_v< std::remove_cvref_t< alph_t > >, std::remove_cvref_t< alph_t >, std::type_identity< alph_t > > s_alph_t
alph_t with cvref removed and possibly wrapped in std::type_identity.
Definition: concept.hpp:633
constexpr auto operator()() const noexcept
Operator definition.
Definition: concept.hpp:650
static constexpr decltype(auto) impl(seqan3::detail::priority_tag< 2 >, [[maybe_unused]] t &&v, [[maybe_unused]] arg_ts &&... args) noexcept(noexcept((deferred_type_t< seqan3::custom::alphabet< alph_t >, decltype(v)>::alphabet_size))) requires requires(seqan3
A customisation point overload.
Definition: concept.hpp:635
Function object definition for seqan3::assign_char_strictly_to.
Definition: concept.hpp:556
constexpr decltype(auto) operator()(seqan3::alphabet_char_t< alphabet_t > const chr, alphabet_t &&alphabet) const
Operator overload for rvalues.
Definition: concept.hpp:559
Functor definition for seqan3::assign_char_to.
Definition: concept.hpp:364
static constexpr decltype(auto) impl(seqan3::detail::priority_tag< 2 >, [[maybe_unused]] t &&v, [[maybe_unused]] arg_ts &&... args) noexcept(noexcept((seqan3::custom::alphabet< decltype(v)>::assign_char_to(args..., v)))) requires requires(seqan3
A customisation point overload.
Definition: concept.hpp:366
constexpr alph_t operator()(seqan3::alphabet_char_t< alph_t > const r, alph_t &&a) const noexcept
Operator definition.
Definition: concept.hpp:381
Functor definition for seqan3::assign_rank_to.
Definition: concept.hpp:173
constexpr alph_t operator()(seqan3::alphabet_rank_t< alph_t > const r, alph_t &&a) const noexcept
Operator definition.
Definition: concept.hpp:190
static constexpr decltype(auto) impl(seqan3::detail::priority_tag< 2 >, [[maybe_unused]] t &&v, [[maybe_unused]] arg_ts &&... args) noexcept(noexcept((seqan3::custom::alphabet< decltype(v)>::assign_rank_to(args..., v)))) requires requires(seqan3
A customisation point overload.
Definition: concept.hpp:175
Functor definition for seqan3::char_is_valid_for.
Definition: concept.hpp:456
std::conditional_t< std::is_nothrow_default_constructible_v< std::remove_cvref_t< alph_t > >, std::remove_cvref_t< alph_t >, std::type_identity< alph_t > > s_alph_t
alph_t with cvref removed and possibly wrapped in std::type_identity.
Definition: concept.hpp:461
constexpr bool operator()(alphabet_char_t< alph_t > const a) const noexcept
Operator definition.
Definition: concept.hpp:479
static constexpr decltype(auto) impl(seqan3::detail::priority_tag< 3 >, [[maybe_unused]] t &&v, [[maybe_unused]] arg_ts &&... args) noexcept(noexcept((deferred_type_t< seqan3::custom::alphabet< alph_t >, decltype(v)>::char_is_valid(v)))) requires requires(seqan3
A customisation point overload.
Definition: concept.hpp:463
seqan3::detail::customisation_point_object (CPO) definition for seqan3::to_char.
Definition: concept.hpp:262
Functor definition for seqan3::to_rank.
Definition: concept.hpp:80
static constexpr decltype(auto) impl(seqan3::detail::priority_tag< 2 >, [[maybe_unused]] t &&v, [[maybe_unused]] arg_ts &&... args) noexcept(noexcept(seqan3::custom::alphabet< decltype(v)>::to_rank(v))) requires requires(seqan3
A customisation point overload.
Definition: concept.hpp:82
constexpr auto operator()(alph_t const a) const noexcept
Operator definition.
Definition: concept.hpp:97
A CRTP base-class that defines a customisation_point_object (CPO).
Definition: customisation_point.hpp:148
Recursion anchor for seqan3::detail::priority_tag.
Definition: customisation_point.hpp:36
A tag that allows controlled overload resolution via implicit base conversion rules.
Definition: customisation_point.hpp:31
An exception typically thrown by seqan3::alphabet::assign_char_strict.
Definition: exception.hpp:26
Provides traits to inspect some information of a type, for example its name.
Provides C++20 additions to the type_traits header.
Provides various type traits on generic types.