SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
seqan3::detail::transfer_type_modifier_onto< source_t, target_t > Struct Template Reference

Transfers the type modifier &, && and const (and any combination) to the target type. More...

#include <seqan3/core/detail/transfer_type_modifier_onto.hpp>

+ Inheritance diagram for seqan3::detail::transfer_type_modifier_onto< source_t, target_t >:

Public Types

using type = maybe_lvalue_reference_target_t
 Transfers the type modifier &, && and const (and any combination) to the target type.
 

Private Types

using maybe_const_target_t = std::conditional_t< std::is_const_v< std::remove_reference_t< source_t > >||std::is_const_v< std::remove_reference_t< target_t > >, std::add_const_t< std::remove_cvref_t< target_t > >, std::remove_cvref_t< target_t > >
 Transfers the const type modifier to the target type.
 
using maybe_lvalue_reference_target_t = std::conditional_t< std::is_lvalue_reference_v< source_t >||std::is_lvalue_reference_v< target_t >, std::add_lvalue_reference_t< maybe_rvalue_reference_t >, maybe_rvalue_reference_t >
 Transfers the & type modifier to the target type.
 
using maybe_rvalue_reference_t = std::conditional_t< std::is_rvalue_reference_v< source_t >||std::is_rvalue_reference_v< target_t >, std::add_rvalue_reference_t< maybe_const_target_t >, maybe_const_target_t >
 Transfers the && type modifier to the target type.
 

Related Symbols

(Note that these are not member symbols.)

template<typename source_t , typename target_t >
using transfer_type_modifier_onto_t = typename transfer_type_modifier_onto< source_t, target_t >::type
 Transfers the type modifier &, && and const (and any combination) to the target type (transformation_trait shortcut).
 

Detailed Description

template<typename source_t, typename target_t>
struct seqan3::detail::transfer_type_modifier_onto< source_t, target_t >

Transfers the type modifier &, && and const (and any combination) to the target type.

Template Parameters
source_tThe type you wish to transfer the type modifier from.
target_tThe type you wish to transfer the type modifier to.

If the target_t already has a type modifier, e.g. const, it will keep that type modifier.

If the resulting type would have the type modifier && and & at the same time, it follows the rule of reference collapsing, that means & will be preferred.

See also
https://en.cppreference.com/w/cpp/language/reference#Reference_collapsing

Friends And Related Symbol Documentation

◆ transfer_type_modifier_onto_t

template<typename source_t , typename target_t >
template<typename source_t , typename target_t >
using transfer_type_modifier_onto_t = typename transfer_type_modifier_onto<source_t, target_t>::type
related

Transfers the type modifier &, && and const (and any combination) to the target type (transformation_trait shortcut).

Template Parameters
source_tThe type you wish to transfer the type modifier from.
target_tThe type you wish to transfer the type modifier to.
See also
seqan3::detail::transfer_type_modifier_onto

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