On 2012-01-26 11:51:10 +0000, "Trass3r" <u...@known.com> said:

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.

Or if you absolutely need both type safety and the values to live in the outer scope, you can do this:

        enum Something
        {
                SomethingPointy,
                SomethingSmooth,
        }
        alias Something.SomethingPointy SomethingPointy;
        alias Something.SomethingSmooth SomethingSmooth;

But that's rather extreme verbosity at the definition.


--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to