EnumBaseType conversion

Robert Fraser fraserofthenight at gmail.com
Tue Jun 16 09:18:26 PDT 2009


dsimcha wrote:
> It has bitten me several times when I have a named enum type next
> to an integer type or something that an integer can be implicitly converted to
> in a function param list:
> 
> enum MyEnum {
>     FOO,
>     BAR
> }

Try...

typedef int _MyEnum;
enum MyEnum : _MyEnum
{
	FOO,
	BAR
}



More information about the Digitalmars-d mailing list