From: Larry Evans (cppljevans_at_[hidden])
Date: 2005-06-17 11:22:44
On 06/17/2005 10:47 AM, Maksym Motornyy wrote:
> Hello, all.
> I want to propose typesafe enums. Sources are available in Boost Sandbox
> (typesafe_enums.zip). Were tested under VC 7.1.
> Main features are:
> - type safety;
> - meaningful printable names;
I find this very useful.
> - ability to use in switch-case constructs;
> - iteration through enumerators;
Something similar has been proposed on the MPL to do list:
search for "don't work with enumeration types:"
Example code is at:
in range_all.zip. If your enumerators can be used to make tuples or
variants with "named" fields, as done in the:
in the vault, I'd be interested.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk