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

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

#include <seqan3/alphabet/concept.hpp>

+ Inheritance diagram for seqan3::detail::adl_only::assign_rank_to_cpo:

Public Types

using base_t = detail::customisation_point_object< assign_rank_to_cpo, 2 >
 CRTP base class seqan3::detail::customisation_point_object.
 

Static Public Member Functions

template<typename alphabet_t >
static constexpr auto cpo_overload (priority_tag< 0 >, seqan3::alphabet_rank_t< alphabet_t > const rank, alphabet_t &&alphabet) noexcept(auto)
 CPO overload (check 1 out of 3): member access, i.e. alphabet.assign_rank(rank)
 
template<typename alphabet_t >
static constexpr auto cpo_overload (priority_tag< 1 >, seqan3::alphabet_rank_t< alphabet_t > const rank, alphabet_t &&alphabet) noexcept(auto)
 CPO overload (check 1 out of 3): argument dependent lookup (ADL), i.e. assign_rank_to(rank, alphabet)
 
template<typename alphabet_t >
static constexpr auto cpo_overload (priority_tag< 2 >, seqan3::alphabet_rank_t< alphabet_t > const rank, alphabet_t &&alphabet) 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< assign_rank_to_cpo, 2 >
constexpr auto operator() (args_t &&... args) const noexcept(auto)
 SFINAE-friendly call-operator of this seqan3::detail::customisation_point_object instance.
 

Detailed Description

Member Function Documentation

◆ cpo_overload() [1/3]

template<typename alphabet_t >
static constexpr auto seqan3::detail::adl_only::assign_rank_to_cpo::cpo_overload ( priority_tag< 0 >  ,
seqan3::alphabet_rank_t< alphabet_t > const  rank,
alphabet_t &&  alphabet 
)
inlinestaticconstexprnoexcept

CPO overload (check 1 out of 3): member access, i.e. alphabet.assign_rank(rank)

Template Parameters
alphabet_tThe type of the alphabet.
Parameters
rankThe rank to assign the alphabet to.
alphabetThe alphabet the rank is assigned to.

We static_cast<alphabet_t> (instead of std::forward) the result of the CPO overload expression, since we want to return an explicit copy of it if the forwarding reference of the alphabet is a rvalue-reference.

◆ cpo_overload() [2/3]

template<typename alphabet_t >
static constexpr auto seqan3::detail::adl_only::assign_rank_to_cpo::cpo_overload ( priority_tag< 1 >  ,
seqan3::alphabet_rank_t< alphabet_t > const  rank,
alphabet_t &&  alphabet 
)
inlinestaticconstexprnoexcept

CPO overload (check 1 out of 3): argument dependent lookup (ADL), i.e. assign_rank_to(rank, alphabet)

Template Parameters
alphabet_tThe type of the alphabet.
Parameters
rankThe rank to assign the alphabet to.
alphabetThe alphabet the rank is assigned to.

We don't perfect-forward alphabet when calling assign_rank_to(rank, alphabet), because we assume that the ADL function is only defined for lvalue-references.

We static_cast<alphabet_t> (instead of std::forward) the result of the CPO overload expression, since we want to return an explicit copy of it if the forwarding reference of the alphabet is a rvalue-reference.

◆ cpo_overload() [3/3]

template<typename alphabet_t >
static constexpr auto seqan3::detail::adl_only::assign_rank_to_cpo::cpo_overload ( priority_tag< 2 >  ,
seqan3::alphabet_rank_t< alphabet_t > const  rank,
alphabet_t &&  alphabet 
)
inlinestaticconstexprnoexcept

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

Template Parameters
alphabet_tThe type of the alphabet.
Parameters
rankThe rank to assign the alphabet to.
alphabetThe alphabet the rank is assigned to.

We don't perfect-forward alphabet when calling assign_rank_to(rank, alphabet), because we assume that the static member function is only defined for lvalue-references.

We static_cast<alphabet_t> (instead of std::forward) the result of the CPO overload expression, since we want to return an explicit copy of it if the forwarding reference of the alphabet is a rvalue-reference.


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