SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
|
Transfers the type modifier &
, &&
and const
(and any combination) to the target type.
More...
#include <seqan3/core/detail/transfer_type_modifier_onto.hpp>
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). | |
Transfers the type modifier &
, &&
and const
(and any combination) to the target type.
source_t | The type you wish to transfer the type modifier from. |
target_t | The 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.
|
related |
Transfers the type modifier &
, &&
and const
(and any combination) to the target type (transformation_trait shortcut).
source_t | The type you wish to transfer the type modifier from. |
target_t | The type you wish to transfer the type modifier to. |