enum scope

Jacob Carlborg doob at me.com
Thu Jan 26 05:17:24 PST 2012


On 2012-01-26 12:51, Trass3r wrote:
>> You can use anonymous enums. The members will then live in the global
>> scope. You can then use just one alias to an int, uint or what's
>> appropriate.
>
> Yeah but you loose type safety.

It's not type safe in C. But you can wrap it in a struct with alias this 
instead.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list