substSwitch

Similar to among but for set of replacements/substitutions substs. Time-Complexity: O(1) thanks to D's switch guaranteeing hash-table matching.

template substSwitch(substs...)
Value
substSwitch
(
Value
)
(
Value value
)
if (
haveCommonType!(Value, substs)
)
if (
(substs.length & 1) == 0 &&
substs.length >= 2
&&
isExpressionTuple!substs
&&
)

Members

Functions

substSwitch
Value substSwitch(Value value)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta