On Wednesday, 24 August 2016 at 23:04:25 UTC, Illuminati wrote:
Well those other answers aren't wrong, but I envisioned that you'd have multiple categories within your sub-enums and whatnot, so you'd need something more like this:
struct A { enum X { one, two, three, }; enum Y { four = X.max + 1, five, six, }; enum Z { seven = Y.max + 1, eight, nine, }; };Continuing each enumeration from the end of the previous ensures you won't get any fields with the same values.