![]() |
Blaze 3.9
|
Base template for the DeclZeroTrait class. More...
#include <DeclZeroTrait.h>
Inherits decltype evalDeclZeroTrait std::declval< T & >.
Base template for the DeclZeroTrait class.
The DeclZeroTrait class template offers the possibility to select the resulting data type of a generic declzero() operation on the given type T. In case the given type T is a fitting data type, DeclZeroTrait defines the nested type Type, which represents the resulting data type of the declzero() operation. Otherwise there is no nested type Type. Note that const and volatile qualifiers and reference modifiers are generally ignored.
Per default, DeclZeroTrait supports all vector and matrix types of the Blaze library (including views and adaptors). For all other data types it is possible to specialize the DeclZeroTrait template. The following example shows the according specialization for the SymmetricMatrix class template:
The following example demonstrates the use of the DeclZeroTrait template, where depending on the given vector or matrix type the resulting type is selected: