From: David B. Held (dheld_at_[hidden])
Date: 2002-12-02 11:12:16
"Johan Nilsson" <johan.nilsson_at_[hidden]> wrote in message
> enum Colors
> Red = 1,
> Blue = 2
> struct ColorTable
> : public StaticLookupTable<ColorTable, Colors, std::string>
> LOOKUP_ENTRY(Red, "Red")
> LOOKUP_ENTRY(Blue, "Blue")
This looks like something that could/should go into a smart enum library.
The ability to map strings to enums seems common enough (and is just as
important to me as iterating over an enum type).
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk