CRTP base-class to declare operators for user-defined product type. More...
Required header: #include <eve/traits/product_type.hpp>
eve::struct_support
is a CRTP based helper class to define product type like user-defined type. If Self
is this type that inherits from eve::struct_supports<Self,Fields...>
, it will behave as a structure containing members of type Fields...
and provides supports for operators based on the implementation of Self
.
Generated operators include:
eve::supports_ordering<Self>::value
evaluates to false
operator+
will be generated if Self::operator+=
is defined. Note that no operators is generated by combining existing operator (like operator-= b from operator+= and operator-) to maximize optimization opportunities.eve::struct_support
also automatically generates the data member for Self
that are stored within a kumi::tuple
and accessible via get<N>(*this)
.
Self | Type to use as CRTP derived class |
Fields | Variadic list describing the data member of Self |