-added export attributes (required by windows to make DLL library, not work at now due to DMD bugs) -interface D files to import
20 lines
714 B
D
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;
|
|
}
|