Boost logo

Boost :

From: Tobias Schwinger (tschwinger_at_[hidden])
Date: 2006-03-29 11:15:33


Tomas Puverle wrote:
> Hey,
>
> Please have a look at the thread on boost.users called "safe assign of int to
> enum" and let me know if there is any interest here in the library I
> describe. (I didn't want to cross-post)
> Any suggestions/feature requests will be gratefully accepted.
> TIA,
>

Yes, I'm interested.

Here is my wish list:

1. only the meta information that is really used should end up in the executable
   (can be done via template instantiations)

2. use a more intuitive name than "smart enum"
   something like "reflective enum" or so

3. the implementation should store the values in a structure like that

    struct enum_name
    {
       enum type { [... values ...] };
    private:
       // [...friend declaration & accessors for meta information...]
    };

3.1. the storage type should be a real enum
3.2. its name should be "type" so the enclosing structure can act as a metafunction
3.3. no public members, access is implemented via freestanding functions

Regards,

Tobias


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk