From: Richard Jennings (richard.jennings_at_[hidden])
Date: 2005-12-22 05:36:18
Here's a request for an extension to ENUM_VALUES for you to consider.
I need to use BOOST_ENUM_VALUES with type std::size_t so I can use the
method 'value' and use the result as an index to a vector. I would also
like to have an end-user readable description for the enumeration value.
Currently I hold this in a separate class that maps enumeration values to
From what I understand, the enumeration tags have to be C++ names so no
spaces are allowed whereas end-users don't usually like CamelCase (or
whatever) unspaced C++ names.
Here's an example:
And then a method something like:
const char* description() const;
Would anyone else find this useful?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk