Metafunctions(redirected from Main.Metafunctions)
This metafunction provides the interface (or Concept) that a given type follows, and a value_type. template <typename T> struct interface { using type = ...; using value_type = ...; }; The default implementation has a type of Vectors will have a
This metafunction is used to get a concrete type from a given type (typically, an expression). This may be used, for example, if a temporary is required during evaluation of an expression. template <typename T, typename Ti = typename interface<T>::type> struct make_value_from_interface { using type = ''concrete_type''; }
Metafunction for getting a concrete type. Doesn't need customization. Strips references and const and returns make_value_from_interface.
Alias for interface<T>::value_type
This metafunction is true if T has a zero value that can be constructed without any additional information. Typically, a scalar will have a zero value, but a matrix or vector will not (because the size information wouldn't be available).
If has_zero<T>, then returns the zero element of type T.
Only defined if has_zero<T>. Returns true if x is equal to the zero element. |