// D import file generated from 'source\ecs\traits.d' module ecs.traits; import std.traits; bool isForeachDelegateWithI(DG)() { return is(DG == delegate) && is(ReturnType!DG == int) && (Parameters!DG.length == 2) && isIntegral!(Parameters!DG[0]); } bool isForeachDelegateWithoutI(DG)() { return is(DG == delegate) && is(ReturnType!DG == int) && (Parameters!DG.length == 1); } bool isForeachDelegateWithTypes(DG, Types...)() { return is(DG == delegate) && is(ReturnType!DG == int) && is(Parameters!DG == Types); } auto assumeNoGC(T)(T t) if (isFunctionPointer!T || isDelegate!T) { enum attrs = functionAttributes!T | FunctionAttribute.nogc; return cast(SetFunctionAttributes!(T, functionLinkage!T, attrs))t; }