SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t > Struct Template Reference

seqan3::detail::customisation_point_object (CPO) definition for seqan3::char_is_valid_for. More...

#include <seqan3/alphabet/concept.hpp>

+ Inheritance diagram for seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t >:

Public Types

template<typename alphabet_type >
using alphabet_or_type_identity = std::conditional_t< std::is_nothrow_default_constructible_v< std::remove_cvref_t< alphabet_type > >, std::remove_cvref_t< alphabet_type >, std::type_identity< alphabet_type > >
 If alphabet_type isn't std::is_nothrow_default_constructible, char_is_valid will be called with std::type_identity instead of a default constructed alphabet.
 
using base_t = detail::customisation_point_object< char_is_valid_for_cpo< alphabet_t >, 3 >
 CRTP base class seqan3::detail::customisation_point_object.
 

Static Public Member Functions

template<typename alphabet_type = alphabet_t>
static constexpr auto cpo_overload (priority_tag< 0 >, alphabet_char_t< alphabet_type > const chr) noexcept(auto)
 CPO overload (check 1 out of 3): seqan3::to_char, seqan3::assign_char_to composition identity.
 
template<typename alphabet_type = alphabet_t>
static constexpr auto cpo_overload (priority_tag< 1 >, alphabet_char_t< alphabet_type > const chr) noexcept(auto)
 CPO overload (check 1 out of 3): static member access, i.e. alphabet_type::char_is_valid(chr)
 
template<typename alphabet_type = alphabet_t>
static constexpr auto cpo_overload (priority_tag< 2 >, alphabet_char_t< alphabet_type > const chr) noexcept(auto)
 CPO overload (check 1 out of 3): argument dependent lookup (ADL), i.e. char_is_valid_for(chr, alphabet_type{})
 
template<typename alphabet_type = alphabet_t>
static constexpr auto cpo_overload (priority_tag< 3 >, alphabet_char_t< alphabet_type > const chr) noexcept(auto)
 CPO overload (check 1 out of 3): explicit customisation via seqan3::custom::alphabet
 

Additional Inherited Members

- Public Member Functions inherited from seqan3::detail::customisation_point_object< char_is_valid_for_cpo< alphabet_t >, 3 >
constexpr auto operator() (args_t &&... args) const noexcept(auto)
 SFINAE-friendly call-operator of this seqan3::detail::customisation_point_object instance.
 

Detailed Description

template<typename alphabet_t>
struct seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t >

seqan3::detail::customisation_point_object (CPO) definition for seqan3::char_is_valid_for.

Template Parameters
alphabet_tThe alphabet type being queried.

Member Function Documentation

◆ cpo_overload() [1/4]

template<typename alphabet_t >
template<typename alphabet_type = alphabet_t>
static constexpr auto seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t >::cpo_overload ( priority_tag< 0 >  ,
alphabet_char_t< alphabet_type > const  chr 
)
inlinestaticconstexprnoexcept

CPO overload (check 1 out of 3): seqan3::to_char, seqan3::assign_char_to composition identity.

Template Parameters
alphabet_typeThe type of the alphabet. (Needed to defer instantiation for incomplete types.)
Parameters
chrThe character of the alphabet.

This is the default implementation. If your alphabet does not differentiates between upper and lower case you need to implement a custom seqan3::char_is_valid_for overload.

This function calls (if alphabet_type is std::is_nothrow_default_constructible)

seqan3::to_char(seqan3::assign_char_to(chr, alphabet_type{})) == chr;
constexpr auto assign_char_to
Assign a character to an alphabet object.
Definition alphabet/concept.hpp:521
constexpr auto to_char
Return the char representation of an alphabet object.
Definition alphabet/concept.hpp:383

otherwise calls

◆ cpo_overload() [2/4]

template<typename alphabet_t >
template<typename alphabet_type = alphabet_t>
static constexpr auto seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t >::cpo_overload ( priority_tag< 1 >  ,
alphabet_char_t< alphabet_type > const  chr 
)
inlinestaticconstexprnoexcept

CPO overload (check 1 out of 3): static member access, i.e. alphabet_type::char_is_valid(chr)

Template Parameters
alphabet_typeThe type of the alphabet. (Needed to defer instantiation for incomplete types.)
Parameters
chrThe character of the alphabet.

◆ cpo_overload() [3/4]

template<typename alphabet_t >
template<typename alphabet_type = alphabet_t>
static constexpr auto seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t >::cpo_overload ( priority_tag< 2 >  ,
alphabet_char_t< alphabet_type > const  chr 
)
inlinestaticconstexprnoexcept

CPO overload (check 1 out of 3): argument dependent lookup (ADL), i.e. char_is_valid_for(chr, alphabet_type{})

Template Parameters
alphabet_typeThe type of the alphabet. (Needed to defer instantiation for incomplete types.)
Parameters
chrThe character of the alphabet.

If the alphabet_type isn't std::is_nothrow_default_constructible, char_is_valid_for(chr, std::type_identity<alphabet_type>{}) will be called.

◆ cpo_overload() [4/4]

template<typename alphabet_t >
template<typename alphabet_type = alphabet_t>
static constexpr auto seqan3::detail::adl_only::char_is_valid_for_cpo< alphabet_t >::cpo_overload ( priority_tag< 3 >  ,
alphabet_char_t< alphabet_type > const  chr 
)
inlinestaticconstexprnoexcept

CPO overload (check 1 out of 3): explicit customisation via seqan3::custom::alphabet

Template Parameters
alphabet_typeThe type of the alphabet. (Needed to defer instantiation for incomplete types.)
Parameters
chrThe character of the alphabet.

The documentation for this struct was generated from the following file:
Hide me