enum scope

Jacob Carlborg doob at me.com
Thu Jan 26 05:41:43 PST 2012


On 2012-01-26 14:23, Trass3r wrote:
>> It's not type safe in C. But you can wrap it in a struct with alias
>> this instead.
>
> Yep, but in D we have strong enums, so why not use them.

What about be able to do something like this:

enum Foo
{
public:
     bar,
     fooBar,
}

Foo f = bar;

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list