Boost logo

Boost :

Subject: Re: [boost] [C++0x] Emulation of scoped enums
From: Beman Dawes (bdawes_at_[hidden])
Date: 2009-03-11 11:28:56

Andrey Semashev wrote:
> Beman Dawes wrote:
>> The improved type safety of the C++0x scoped enum feature is
>> attractive, so I'd like to start using it as it becomes available in
>> compilers.
>> See
>> for a description. Note that the committee changed the name from
>> strongly typed enums to scoped enums.
>> See the attached for a boost/detail header that provides macro
>> wrappers that use scoped enums if available, otherwise fall back on
>> C++03 namespaces and unscoped enums. It lets a library write:
> Could this be rewritten to use structs instead of namespaces? This would
> allow to declare enums nested in classes.

Ha! Good point! Changed.


Boost list run by bdawes at, gregod at, cpdaniel at, john at