
15 Sep
2008
15 Sep
'08
9:57 a.m.
Tony D skrev:
Anyone think this functionality belongs in boost? (I have working code)
ENUM(X, B = N, C, D = B + C }; // or whatever X x1 = C; cout << x1 << '\n'; // outputs "C\n" X x2("D"); // construct from string... if (x2 == D) { will do }
The answer is "yes", but please compare with the smart enum proposal that is already in the vault. I don't know the exact status of this, but it looks close to review ready, although the author might not be working on it. -Thorsten