we could add "in" to Tuple and get to write:if (x in tuple("struct", "class", "union")) { ... }
if (x in tuple(1, new Foo(), "baa!") { ... } Just kidding. tuple has the inconvenience that we don't know the values at compile-time. If we did, we could take advantage of some cleverer tricks for fast comparison. At the same time, it's a neat and logical solution. -- Simen