isPureType

if T is array returns isPureType!(ForeachType!T), if T isn't array returns isPureData!T

template isPureType (
T
) {
enum isPureType;
enum isPureType;
}

Examples

1 static assert(  isPureType!int );
2 static assert(  isPureType!(int[]) );
3 static assert(  isPureType!float );
4 static assert(  isPureType!(float[]) );
5 
6 static struct Vec { float x,y,z; }
7 static assert(  isPureType!Vec );
8 
9 static struct Arr { int[3] data; }
10 static assert(  isPureType!Arr );
11 
12 static struct Some { float f; Vec v; Arr a; }
13 static assert(  isPureType!Some );
14 
15 static assert(  isPureType!string );
16 
17 static assert(  isPureType!(const(string)) );
18 static assert(  isPureType!(string[]) );
19 
20 static struct Bad { int[] data; }
21 static assert( !isPureType!Bad );

Meta