(5, true )) useGizmo(gizmo); } writeln(stopWatch.peek.msecs, "ms"); assert(numTimesUsedSpinny == 25_000 * 10_000); assert(numTimesUsedTwoPort == 20_000 * 10_000); } } Conversion Downsides And Possible Fixes There are a couple downsides to the runtime conversions above.
(5, true))) gizmoUnion.gizmo5S = value; currentType = typeid(T); } } void useGizmo(T)(T gizmo) { writeln("Using a g