blaze::LowType< T1, T2 > Struct Template Reference

Base template for the LowType type trait. More...

#include <LowType.h>

Detailed Description

template<typename T1, typename T2>
struct blaze::LowType< T1, T2 >

Base template for the LowType type trait.

General

The LowType class template determines the less significant, submissive data type of the two given data types T1 and T2. For instance, in case both T1 and T2 are built-in data types, the nested type Type is set to the smaller or unsigned data type. In case no lower data type can be selected, Type is set to INVALID_TYPE. Note that cv-qualifiers and reference modifiers are generally ignored.

Per default, the LowType template provides specializations for the following built-in data types:

Additionally, the Blaze library provides specializations for the following user-defined arithmetic types, wherever a less significant data type can be selected:


Creating custom specializations

It is possible to specialize the LowType template for additional user-defined data types. The following example shows the according specialization for two dynamic column vectors:

template< typename T1, typename T2 >
struct LowType< DynamicVector<T1,false>, DynamicVector<T2,false> >
{
using Type = DynamicVector< typename LowType<T1,T2>::Type, false >;
};

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