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 ) );
get ElemInfo from type
works with: * single numeric * static arrays of numeric