![]() |
Base template for the ExpandTrait class. More...
#include <ExpandTrait.h>
Base template for the ExpandTrait class.
The ExpandTrait class template offers the possibility to select the resulting data type when expanding a dense or sparse vector or matrix. ExpandTrait defines the nested type Type, which represents the resulting data type of the expand operation. In case the given data type is not a dense or sparse vector or matrix type, the resulting data type Type is set to INVALID_TYPE. Note that const and volatile qualifiers and reference modifiers are generally ignored.
Per default, ExpandTrait 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 ExpandTrait template. The following example shows the according specialization for the DynamicVector class template:
The following example demonstrates the use of the ExpandTrait template, where depending on the given vector or matrix type the resulting type is selected: