"Johan Nilsson" <[EMAIL PROTECTED]> wrote in message
asf9bt$7g6$[EMAIL PROTECTED]">news:asf9bt$7g6$[EMAIL PROTECTED]...
> [...]
> enum Colors
> {
>   Red = 1,
>   Blue = 2
> };
>
> struct ColorTable
>   : public StaticLookupTable<ColorTable, Colors, std::string>
> {
>   LOOKUP_TABLE_BEGIN()
>   LOOKUP_ENTRY(Red, "Red")
>   LOOKUP_ENTRY(Blue, "Blue")
>   LOOKUP_TABLE_END()
> };
> [...]

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).

Dave




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to