D-Programming-Language/phobos — pull request #2464 by monarchdodra (2014-08-25 22:18:57+00:00)
Title: Tweak enum tables in std/utf.d

This changes the enum tables into TypeTuples.

- It avoids easy breakage in case the code is changed and uses run-time accesses, as a TT *can't* be run-time indexed.
- It avoids reader confusion (myself, Andrei, and others have been suspicious about that line of code): It relies on an optimization so that no allocation occurs. Only once you realize that, you understand why no allocation occurs. With a TT, there is no allocation. End of story.

So I think this is better style overall, and we should adopt it.

Note: I changed two places: One used inference, the other used explicit `uint`. I opted to use inference in both spots, so as to avoid un-necessary differences in the code. And it makes no difference in the end, so might as well keep copy pasted code the same.