22 namespace seqan3::detail::adl_only
26 template <
typename ...args_t>
39 template <typename alph_t>
41 requires requires (alph_t const chr) { { impl(priority_tag<2>{}, chr) }; }
43 constexpr
auto operator()(alph_t
const chr)
const noexcept
45 static_assert(noexcept(impl(priority_tag<2>{}, chr)),
46 "Only overloads that are marked noexcept are picked up by seqan3::to_phred().");
47 static_assert(std::constructible_from<
size_t, decltype(impl(priority_tag<2>{}, chr))>,
48 "The return type of your to_phred() implementation must be convertible to size_t.");
50 return impl(priority_tag<2>{}, chr);
89 inline constexpr
auto to_phred = detail::adl_only::to_phred_fn{};
95 template <
typename alphabet_type>
107 namespace seqan3::detail::adl_only
111 template <
typename ...args_t>
116 struct assign_phred_to_fn
125 template <typename alph_t>
128 { { impl(priority_tag<2>{}, a, p) }; }
132 static_assert(noexcept(impl(priority_tag<2>{}, a, p)),
133 "Only overloads that are marked noexcept are picked up by seqan3::assign_phred_to().");
134 static_assert(std::same_as<alph_t &, decltype(impl(priority_tag<2>{}, a, p))>,
135 "The return type of your assign_phred_to() implementation must be 'alph_t &'.");
137 return impl(priority_tag<2>{}, a, p);
141 template <
typename alph_t>
144 { { impl(priority_tag<2>{}, a, p) }; } && (!std::is_lvalue_reference_v<alph_t>)
148 return (*
this)(p, a);
229 template <
typename t>
267 template <
typename t>
270 requires(t v, alphabet_phred_t<t> c)
Core alphabet concept and free function/type trait wrappers.
#define SEQAN3_CPO_IMPL(PRIO, TERM)
A macro that helps defining the overload set of a customisation point.
Definition: customisation_point.hpp:47
constexpr auto to_phred
The public getter function for the Phred representation of a quality score.
Definition: concept.hpp:89
decltype(seqan3::to_phred(std::declval< alphabet_type >())) alphabet_phred_t
The phred_type of the alphabet; defined as the return type of seqan3::to_phred.
Definition: concept.hpp:99
constexpr auto assign_phred_to
Assign a Phred score to a quality alphabet object.
Definition: concept.hpp:189
The generic alphabet concept that covers most data types used in ranges.
A concept that indicates whether an alphabet represents quality scores.
Refines seqan3::alphabet and adds assignability.
A concept that indicates whether a writable alphabet represents quality scores.
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