blaze::UnaryMapTrait< T, OP > Struct Template Reference

Base template for the UnaryMapTrait class. More...

#include <UnaryMapTrait.h>

Detailed Description

template<typename T, typename OP>
struct blaze::UnaryMapTrait< T, OP >

Base template for the UnaryMapTrait class.

General

The UnaryMapTrait class template offers the possibility to select the resulting data type of a generic, unary map operation on the given type T. UnaryMapTrait defines the nested type Type, which represents the resulting data type of the map operation. In case no result type can be determined for the type T, a compilation error is created. Note that const and volatile qualifiers and reference modifiers are generally ignored.

Per default, UnaryMapTrait supports all built-in data types. Additionally, the Blaze library provides appropriate specializations for the following user-defined arithmetic types:


Creating custom specializations

UnaryMapTrait is guaranteed to work for all data types that work in combination with the provided custom operation OP. In order to add support for user-defined data types or in order to adapt to special cases it is possible to specialize the UnaryMapTrait template. The following example shows the according specialization for unary map operations with a dynamic column vector:

template< typename T, typename OP >
struct UnaryMapTrait< DynamicVector<T,columnVector>, OP >
{
using Type = DynamicVector< typename UnaryMapTrait<T,OP>::Type, columnVector >;
};

The documentation for this struct was generated from the following file: