/auto vshCreate(Ts args, const(VkAllocationCallbacks)* allocator, Params[$-1]* outPtr) { / f(args, allocator, outPtr); /} /// Second to last argument allocator. /static if (is(Params[$-2] == const(VkAllocationCallbacks)*)) { / // Given no allocator / auto vshCreate(Ts args, Vsh!(createInfoName!(Ts[$-1]))* outPtr) { / f(args,null,outPtr); / } /} /// Last argument allocator. /static if (is(Params[$-1] == const(VkAllocationCallbacks)*)) { / // Given no allocator / auto vsh(Ts args) { / f(args,null); / } /} / static if (isPointer!(Params[$-1]) && __traits(compiles, {PointerTarget!(Params[$-1]) outPtr;})) {
See Implementation
/auto vshCreate(Ts args, const(VkAllocationCallbacks)* allocator, Params[$-1]* outPtr) { / f(args, allocator, outPtr); /} /// Second to last argument allocator. /static if (is(Params[$-2] == const(VkAllocationCallbacks)*)) { / // Given no allocator / auto vshCreate(Ts args, Vsh!(createInfoName!(Ts[$-1]))* outPtr) { / f(args,null,outPtr); / } /} /// Last argument allocator. /static if (is(Params[$-1] == const(VkAllocationCallbacks)*)) { / // Given no allocator / auto vsh(Ts args) { / f(args,null); / } /} / static if (isPointer!(Params[$-1]) && __traits(compiles, {PointerTarget!(Params[$-1]) outPtr;})) {