Match

get the first item in a list of zero-parameter templates (patterns) which successfully compiles if all patterns fail, the final pattern is forcibly instantiated thus it can be useful to have a fallback or diagnostic in the final position

Members

Aliases

Match
alias Match = Instantiate!(patterns[0])
Undocumented in source.
Match
alias Match = Match!(patterns[1..$])
Undocumented in source.

Examples

byte a ()() {return NOT_EXISTS;}
long b ()() {}
bool c ()() {return true;}

static assert (is (typeof(Match!(a,b,c)()) == bool));

Meta