ElemInfo.fromType

get ElemInfo from type

works with: * single numeric * static arrays of numeric

struct ElemInfo
pure @safe nothrow @nogc static
fromType
@property
(
T
)
(
)
if (
!hasIndirections!T
)

Examples

1 static assert( ElemInfo.fromType!(int[2]) == ElemInfo( 2, DataType.INT ) );
2 static assert( ElemInfo.fromType!float == ElemInfo( 1, DataType.FLOAT ) );
3 
4 static class A{}
5 
6 static assert( !__traits(compiles, ElemInfo.fromType!A ) );
7 static assert( !__traits(compiles, ElemInfo.fromType!(int[]) ) );
8 static assert( !__traits(compiles, ElemInfo.fromType!dvec ) );

Meta