20
|
1 module std.traits;
|
|
2 struct TypeHolder(S, T...) {
|
|
3 S _ReturnType;
|
|
4 T _ParameterTypeTuple;
|
|
5 }
|
|
6 TypeHolder!(S, T) *IFTI_gen(S, T...)(S delegate(T) dg) { return null; }
|
|
7 TypeHolder!(S, T) *IFTI_gen(S, T...)(S function(T) dg) { return null; }
|
|
8 template ParameterTypeTuple(T) {
|
|
9 alias typeof(IFTI_gen(T.init)._ParameterTypeTuple) ParameterTypeTuple;
|
|
10 }
|
|
11 template ReturnType(T) {
|
|
12 alias typeof(IFTI_gen(T.init)._ReturnType) ReturnType;
|
|
13 }
|
|
14 template isArray(T) { const bool isArray=false; }
|
|
15 template isArray(T: T[]) { const bool isArray=true; }
|