|
Boost : |
From: Tony D (tony_in_da_uk_at_[hidden])
Date: 2008-05-14 12:33:54
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 }
Tony
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk