Blaze  3.6
blaze::UnderlyingElement< T > Struct Template Reference

Evaluation of the element type of a given data type.This type trait evaluates the underlying element type of the given data type T. If the given type provides a nested type ElementType, this type is reported as underlying element type type via the nested type Type. Else if the type provides a nested value_type, this type is reported as underlying element type. Else the given type itself reported as the underlying element type. Examples: More...

#include <UnderlyingElement.h>

Detailed Description

template<typename T>
struct blaze::UnderlyingElement< T >

Evaluation of the element type of a given data type.

This type trait evaluates the underlying element type of the given data type T. If the given type provides a nested type ElementType, this type is reported as underlying element type type via the nested type Type. Else if the type provides a nested value_type, this type is reported as underlying element type. Else the given type itself reported as the underlying element type. Examples:

using Type1 = double; // Built-in data type
using Type2 = complex<float>; // Complex data type
using Type3 = std::vector<short>; // std::vector with built-in element type
using Type4 = StaticVector<int,3UL>; // Vector with built-in element type
using Type5 = CompressedMatrix< DynamicVector<float> >; // Matrix with vector element type
blaze::UnderlyingElement< Type5 >::Type // corresponds to DynamicVector<float>

Note that it is possible to add support for other data types that have an underlying element type but do neither provide a nested ElementType nor value_type type by specializing the UnderlyingElement class template.


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