The OpenD Programming Language

canMatch

True if handler is a potential match for Ts, otherwise false.

See the documentation for match for a full explanation of how matches are chosen.

template canMatch (
alias handler
Ts...
) if (
Ts.length > 0
) {
enum canMatch;
}

Examples

alias handleInt = (int i) => "got an int";

assert( canMatch!(handleInt, int));
assert(!canMatch!(handleInt, string));

Meta