Operatorability Concepts#
- group Operatorability Concepts
Assortment of
conceptdefinitions requiring type(s) to support various operators.Example:#
#include <hyperion/mpl/concepts/comparable.h using namespace hyperion::mpl::concepts; struct not_addable {}; static_assert(Addable<int, double>); static_assert(!Addable<not_addable, int>);
-
template<typename TLhs>
concept UnaryPlusable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhssupports the unary plus operator (unaryoperator+)
-
template<typename TLhs>
concept UnaryMinusable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhssupports the unary minus operator (unaryoperator-)
-
template<typename TLhs>
concept Addressable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhsis addressable (i.e., it supports unaryoperator&)Note
This be
truefor types. It is rarely (read: never) not an error to overload the address-of operator
-
template<typename TLhs>
concept Dereferencible# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhsis dereferencible (i.e., it supports unaryoperator*)
-
template<typename TLhs>
concept Arrowable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhssupports the pointer-to-memeber operator (i.e., it supports unaryoperator->)
-
template<typename TLhs, typename TRhs = TLhs>
concept Addable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that
TLhsandTRhsare addable (they support binaryoperator+)
-
template<typename TLhs, typename TRhs = TLhs>
concept Subtractable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that
TLhsandTRhsare subtractable (they support binaryoperator-)
-
template<typename TLhs, typename TRhs = TLhs>
concept Multipliable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that
TLhsandTRhsare multipliable (they support binaryoperator*)
-
template<typename TLhs, typename TRhs = TLhs>
concept Dividible# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that
TLhsandTRhsare dividible (they support binaryoperator/)
-
template<typename TLhs>
concept BinaryNotable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhssupports the binary not operator (operator~)
-
template<typename TLhs, typename TRhs = TLhs>
concept BinaryAndable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that
TLhsandTRhsare binary andable (they support binaryoperator&)
-
template<typename TLhs, typename TRhs = TLhs>
concept BinaryOrable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that
TLhsandTRhsare binary orable (they support binaryoperator|)
-
template<typename TLhs>
concept BooleanNotable# - #include <hyperion/mpl/concepts/operator_able.h>
Concept definition requiring that a
TLhssupports the boolean not operator (operator!)