# Ambiguous Enum Comparison

## Recommended Posts

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.

##### Share on other sites

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

##### Share on other sites

I've checked in this patch in revision 2013.

Thanks,

Andreas