|
Boost Users : |
From: Nat Goodspeed (ngoodspeed_at_[hidden])
Date: 2006-03-27 16:05:29
> -----Original Message-----
> From: boost-users-bounces_at_[hidden] [mailto:boost-users-
> bounces_at_[hidden]] On Behalf Of Tomas Puverle
> Sent: Monday, March 27, 2006 3:07 PM
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] safe assign of int to enum
>
> I wrote a library for "smart enums" that allow you to:
>
> 1) Keep a forward and reverse mappings between enums and strings (in
> fact,
> you can use multiple strings for a single enum value ;) This is done
in
> such a
> way that you can't fail to update the string table if you add/change
an
> enum
> and vice versa.
[Nat] I have long wished the compiler would support mapping enums
to/from string. If you have a maintainable way to do that, I'm very
interested.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net