On Monday, 3 September 2012 at 11:20:27 UTC, Sven Torvinger wrote:
if (a.among("struct", "class", "union")) { ... }
Wouldn't that rather be a.among!("struct", "class", "union")? If the string is not known at compile-time, I'd prefer to focus on optimizing something along the lines of ["struct", "class", "union"].canFind(a) (something similar is actually a quite common idiom in Ruby).
David