blaze::MapTrait< Args > Struct Template Reference

Base template for the MapTrait class. More...

#include <MapTrait.h>

Detailed Description

template<typename... Args>
struct blaze::MapTrait< Args >

Base template for the MapTrait class.

General

The MapTrait class template offers the possibility to select the resulting data type of a generic unary or binary map operation. MapTrait 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.


Creating custom specializations

MapTrait is guaranteed to work for all built-in data types, complex numbers, all vector and matrix types of the Blaze library (including views and adaptors) and 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 MapTrait template. The following example shows the according specialization for map operations with a dynamic column vector:

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

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