Ambiguous Enum Comparison

Started by
1 comment, last by WitchLord 9 years, 6 months ago

The following code will produce an error, even though the ambiguity could be resolved.


enum MyEnum1
{
    cYes,
    cNo
}

enum MyEnum2
{
    cNo,
    cYes
}

bool main()
{
    MyEnum1 e = cNo;
    return e == cYes;
}

I have attached a patch that resolves the ambiguity.

Advertisement

Thanks. I'll take a look on this and incorporate it into the library if all is well.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I've checked in this patch in revision 2013.

Thanks,

Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement