Blaze 3.9
Loading...
Searching...
No Matches
blaze::HighType< T1, T2, typename > Struct Template Reference

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

#include <HighType.h>

Detailed Description

template<typename T1, typename T2, typename = void>
struct blaze::HighType< T1, T2, typename >

Base template for the HighType type trait.

General

The HighType class template determines the more significant, dominating data type of the two given data types T1 and T2. In case both T1 and T2 are built-in data types, the nested type Type is set to the larger or signed data type. If case both built-in types have the same size and the same signedness, the selected type is implementation defined. In case no higher data type can be selected, Type is set to INVALID_TYPE.

Per default, the HighType template provides support for the following built-in data types:

  • Integral types
    • unsigned char, signed char, char, wchar_t
    • char16_t, char32_t
    • unsigned short, short
    • unsigned int, int
    • unsigned long, long
    • std::size_t, std::ptrdiff_t (for certain 64-bit compilers)
  • Floating point types
    • float
    • double
    • long double

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


Creating custom specializations

It is possible to specialize the HighType 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 HighType< DynamicVector<T1,false>, DynamicVector<T2,false> >
{
};
Efficient implementation of an arbitrary sized vector.
Definition DynamicVector.h:223
Base template for the HighType type trait.
Definition HighType.h:322

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