General Operator Detection#
- group general_operator_detection
Assortment of type traits to determine if an overload of an operator exists accepting one (or more) types.
Example:#
#include <hyperion/mpl/type_traits/is_operator_able.h> using namespace hyperion::mpl::type_traits; struct not_addable {}; static_assert(is_addable_v<int, int>); static_assert(!is_addable_v<not_addable, not_addable>);
Typedefs
-
template<typename TLhs>
using unary_plus_result_t = typename is_unary_plusable<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_unary_plusable
. Used to determine the type of the returned result of invoking unaryoperator+
on aTLhs
, i.e.decltype(+std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_unary_plusable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator+
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_unary_plusable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
using unary_minus_result_t = typename is_unary_minusable<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_unary_minusable
. Used to determine the type of the returned result of invoking unaryoperator-
on aTLhs
, i.e.decltype(-std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_unary_minusable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator-
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_unary_minusable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
using binary_not_result_t = typename is_binary_notable<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_binary_notable
. Used to determine the type of the returned result of invokingoperator~
on aTLhs
, i.e.decltype(~std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_binary_notable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator~
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_binary_notable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
using boolean_not_result_t = typename is_boolean_notable<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_boolean_notable
. Used to determine the type of the returned result of invokingoperator!
on aTLhs
, i.e.decltype(!std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_boolean_notable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator!
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_boolean_notable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
using address_result_t = typename is_addressable<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_addressable
. Used to determine the type of the returned result of invoking unaryoperator&
on aTLhs
, i.e.decltype(&std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_addressable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator&
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_addressable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
using arrow_result_t = typename is_arrowable<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_arrowable
. Used to determine the type of the returned result of invokingoperator->
on aTLhs
, i.e.decltype(std::declval<TLhs>()->)
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_arrowable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke theoperator->
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_arrowable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
using dereference_result_t = typename is_dereferencible<TLhs>::result_type# Alias to the
result_type
membertypedef
ofis_dereferencible
. Used to determine the type of the returned result of invoking unaryoperator*
on aTLhs
, i.e.decltype(*std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_dereferencible<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator*
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_dereferencible
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs, typename TRhs = TLhs>
using add_result_t = typename is_addable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_addable
. Used to determine the type of the returned result of invoking the addition operator (i.e.operator+
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() + std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_addable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the addition operator (i.e.operator+
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_addable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using subtract_result_t = typename is_subtractable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_subtractable
. Used to determine the type of the returned result of invoking the subtraction operator (i.e.operator-
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() - std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_subtractable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the subtraction operator (i.e.operator-
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_subtractable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using multiply_result_t = typename is_multipliable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_multipliable
. Used to determine the type of the returned result of invoking the multiplication operator (i.e.operator*
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() * std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_multipliable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the multiplication operator (i.e.operator*
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_multipliable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using divide_result_t = typename is_dividible<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_dividible
. Used to determine the type of the returned result of invoking the division operator (i.e.operator/
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() / std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_dividible<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the division operator (i.e.operator/
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_dividible
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using binary_and_result_t = typename is_binary_andable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_binary_andable
. Used to determine the type of the returned result of invoking the binary and operator (i.e.operator&
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() & std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_binary_andable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the binary and operator (i.e.operator&
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_binary_andable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using binary_or_result_t = typename is_binary_orable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_binary_orable
. Used to determine the type of the returned result of invoking the binary or operator (i.e.operator|
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() | std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_binary_orable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the binary or operator (i.e.operator|
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_binary_orable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using boolean_and_result_t = typename is_boolean_andable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_boolean_andable
. Used to determine the type of the returned result of invoking the boolean and operator (i.e.operator&&
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() && std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_boolean_andable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the boolean and operator (i.e.operator&&
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_boolean_andable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
using boolean_or_result_t = typename is_boolean_orable<TLhs, TRhs>::result_type# Alias to the
result_type
membertypedef
ofis_boolean_orable
. Used to determine the type of the returned result of invoking the boolean or operator (i.e.operator||
) with aTLhs
andTRhs
, i.e.decltype(std::declval<TLhs>() || std::declval<TRhs>())
- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_boolean_orable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the boolean or operator (i.e.operator||
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_boolean_orable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
Variables
-
template<typename TLhs>
static constexpr auto is_unary_plusable_v = is_unary_plusable<TLhs>::value# Value of the type trait
is_unary_plusable
. Used to determine if a type supports unaryoperator+
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator+
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_unary_plusable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
static constexpr auto is_unary_minusable_v = is_unary_minusable<TLhs>::value# Value of the type trait
is_unary_minusable
. Used to determine if a type supports unaryoperator-
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator-
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_unary_minusable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
static constexpr auto is_binary_notable_v = is_binary_notable<TLhs>::value# Value of the type trait
is_binary_notable
. Used to determine if a type supports the binary not operator, i.e.operator~
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator~
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_binary_notable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
static constexpr auto is_boolean_notable_v = is_boolean_notable<TLhs>::value# Value of the type trait
is_boolean_notable
. Used to determine if a type supports the boolean not operator, i.e.operator!
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator!
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_boolean_notable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
static constexpr auto is_addressable_v = is_addressable<TLhs>::value# Value of the type trait
is_addressable
. Used to determine if a type supports the address of operator, i.e. unaryoperator&
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator&
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_addressable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
static constexpr auto is_arrowable_v = is_arrowable<TLhs>::value# Value of the type trait
is_arrowable
. Used to determine if a type supports the pointer to member operator, i.e.operator->
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke theoperator->
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_arrowable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
static constexpr auto is_dereferencible_v = is_dereferencible<TLhs>::value# Value of the type trait
is_dereferencible
. Used to determine if a type supports the dereference operator, i.e. unaryoperator*
.- Template Parameters:
TLhs – The type to check
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator*
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_dereferencible
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_addable_v = is_addable<TLhs, TRhs>::value# Value of the type trait
is_addable
. Used to determine ifTLhs
andTRhs
are addable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the addition operator (i.e.operator+
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_addable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_subtractable_v = is_subtractable<TLhs, TRhs>::value# Value of the type trait
is_subtractable
. Used to determine ifTLhs
andTRhs
are subtractable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the subtraction operator (i.e.operator-
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_subtractable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_multipliable_v = is_multipliable<TLhs, TRhs>::value# Value of the type trait
is_multipliable
. Used to determine ifTLhs
andTRhs
are multipliable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the multiplication operator (i.e.operator*
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_multipliable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_dividible_v = is_dividible<TLhs, TRhs>::value# Value of the type trait
is_dividible
. Used to determine ifTLhs
andTRhs
are dividible.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the division operator (i.e.operator/
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_dividible
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_binary_andable_v = is_binary_andable<TLhs, TRhs>::value# Value of the type trait
is_binary_andable
. Used to determine ifTLhs
andTRhs
are binary andable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the binary and operator (i.e.operator&
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_binary_andable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_binary_orable_v = is_binary_orable<TLhs, TRhs>::value# Value of the type trait
is_binary_orable
. Used to determine ifTLhs
andTRhs
are binary orable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the binary or operator (i.e.operator|
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_binary_orable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_boolean_andable_v = is_boolean_andable<TLhs, TRhs>::value# Value of the type trait
is_boolean_andable
. Used to determine ifTLhs
andTRhs
are boolean andable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the boolean and operator (i.e.operator&&
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_boolean_andable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
static constexpr auto is_boolean_orable_v = is_boolean_orable<TLhs, TRhs>::value# Value of the type trait
is_boolean_orable
. Used to determine ifTLhs
andTRhs
are boolean orable.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the boolean or operator (i.e.operator||
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_boolean_orable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs>
struct is_unary_plusable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports unary
operator+
.In addition to providing the static member
value
, indicating whether aTLhs
supports unaryoperator+
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator+
overload, i.e.decltype(+std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_unary_plusable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator+
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_unary_plusable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
struct is_unary_minusable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports unary
operator-
.In addition to providing the static member
value
, indicating whether aTLhs
supports unaryoperator-
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator-
overload, i.e.decltype(-std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_unary_minusable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator-
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_unary_minusable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
struct is_binary_notable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports the binary not operator, i.e.
operator~
.In addition to providing the static member
value
, indicating whether aTLhs
supportsoperator~
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator~
overload, i.e.decltype(~std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_binary_notable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator~
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_binary_notable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
struct is_boolean_notable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports the boolean not operator, i.e.
operator!
.In addition to providing the static member
value
, indicating whether aTLhs
supportsoperator!
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator!
overload, i.e.decltype(!std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_boolean_notable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator!
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_boolean_notable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
struct is_addressable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports the address of operator, i.e. unary
operator&
.In addition to providing the static member
value
, indicating whether aTLhs
supports unaryoperator&
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator&
overload, i.e.decltype(&std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_addressable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator&
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_addressable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
struct is_arrowable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports the pointer to member operator, i.e.
operator->
.In addition to providing the static member
value
, indicating whether aTLhs
supportsoperator->
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator->
overload, i.e.decltype(std::declval<TLhs>()->)
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_arrowable<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke theoperator->
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_arrowable
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs>
struct is_dereferencible : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type Trait to determine if a type supports the dereference operator, i.e. unary
operator*
.In addition to providing the static member
value
, indicating whether aTLhs
supports unaryoperator*
, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator*
overload, i.e.decltype(*std::declval<TLhs>())
- Template Parameters:
TLhs – The type to check
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_dereferencible<TLhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification of the unqualified type ofTLhs
. I.E., given a typeTType
, if you intend to invoke the unaryoperator*
overload associated withTType
with aconst TType&
, make sure that you instantiate and useis_dereferencible
withTLhs = const TType&
, notTType
,TType&
or any other qualification.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_addable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are addable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are addable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator+
overload, i.e.decltype(std::declval<TLhs>() + std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_addable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the addition operator (i.e.operator+
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_addable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_subtractable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are subtractable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are subtractable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator-
overload, i.e.decltype(std::declval<TLhs>() - std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_subtractable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the subtraction operator (i.e.operator-
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_subtractable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_multipliable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are multipliable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are multipliable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator*
overload, i.e.decltype(std::declval<TLhs>() * std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_multipliable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the multiplication operator (i.e.operator*
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_multipliable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_dividible : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are dividible.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are dividible, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator/
overload, i.e.decltype(std::declval<TLhs>() / std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_dividible<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the division operator (i.e.operator/
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_dividible
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_binary_andable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are binary andable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are binary andable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator&
overload, i.e.decltype(std::declval<TLhs>() & std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_binary_andable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the binary and operator (i.e.operator&
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_binary_andable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_binary_orable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are binary orable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are binary orable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator|
overload, i.e.decltype(std::declval<TLhs>() | std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_binary_orable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the binary or operator (i.e.operator|
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_binary_orable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_boolean_andable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are boolean andable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are boolean andable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator&&
overload, i.e.decltype(std::declval<TLhs>() && std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_boolean_andable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the boolean and operator (i.e.operator&&
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_boolean_andable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs, typename TRhs = TLhs>
struct is_boolean_orable : public std::false_type# - #include <hyperion/mpl/type_traits/is_operator_able.h>
Type trait to determine if
TLhs
andTRhs
are boolean orable.In addition to providing the static member
value
, indicating whether aTLhs
andTRhs
are boolean orable, also provides the membertypedef
typeresult_type
equal to the type of the returned result of invoking the associatedoperator||
overload, i.e.decltype(std::declval<TLhs>() || std::declval<TRhs>())
.- Template Parameters:
TLhs – The type of the left-hand parameter
TRhs – The type of the right-hand parameter. Defaults to
TLhs
Note
Presence of
result_type
should not be used as a short-hand or alternaitve to checkingvalue
in any way (e.g. in a SFINAE-compatible context or C++20requires
clause): ifis_boolean_orable<TLhs, TRhs>::value == false
, thenresult_type
will bevoid
Note
Due to overloadability by cv-ref qualification, care should be taken to ensure that use of
result_type
(and this trait in general) is associated with the correct cv-ref qualification(s) of the unqualified types ofTLhs
andTRhs
. I.E., given typesTType1
andTType2
, if you intend to invoke the boolean or operator (i.e.operator||
) overload associated withTType1
andTType2
withconst TType1&
andconst TType2&
, make sure sure that you instantiate and useis_boolean_orable
withTLhs = const TType1&
andTRhs = const TType2&
, notTType1
,TType2&
or any other qualification of either type thereof.
-
template<typename TLhs>