On Wednesday, 19 February 2014 at 21:52:06 UTC, anonymous wrote:
Nope. v and vals are runtime parameters, their values are not known at compile time. What's known at compile time is vals.length.
While this is correct, note that there is also an overload that takes `values` as compile-time parameters, generating a switch statement, which is especially interesting because the switch statement is a good opportunity for the compiler to optimise.