bubel-ecs/import/ecs/traits.di
Mergul d0fcdba6cd -registering same system multiple times only replace pointer for callback
-added export attributes (required by windows to make DLL library, not work at now due to DMD bugs)
-interface D files to import
2018-09-18 13:28:04 +02:00

20 lines
714 B
D

// 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;
}