/template hasAltType(T) { / static if (isPointer!T && is(Unconst!(PointerTarget!T) == struct)) / enum hasAltType = __traits(identifier, Unconst!(PointerTarget!T)).endsWith("CreateInfo"); / else / enum hasAltType = false; /} /template AltType(T) { / static if (hasAltType!T) / alias AltType = PointerTarget!T; / else / alias AltType = T; /} /template altArg(T)(T arg) { / /} /mixin forParams!Params; /static if (anySatisfy!(hasAltType,Params)) / mixin forParams!(staticMap!(AltType,Params)); /mixin template forParams(Params...) {
See Implementation
/template hasAltType(T) { / static if (isPointer!T && is(Unconst!(PointerTarget!T) == struct)) / enum hasAltType = __traits(identifier, Unconst!(PointerTarget!T)).endsWith("CreateInfo"); / else / enum hasAltType = false; /} /template AltType(T) { / static if (hasAltType!T) / alias AltType = PointerTarget!T; / else / alias AltType = T; /} /template altArg(T)(T arg) { / /} /mixin forParams!Params; /static if (anySatisfy!(hasAltType,Params)) / mixin forParams!(staticMap!(AltType,Params)); /mixin template forParams(Params...) {