[cfe-dev] error: use of overloaded operator '==' is ambiguous
Eli Friedman
eli.friedman at gmail.com
Thu Jul 29 18:55:12 PDT 2010
On Thu, Jul 29, 2010 at 6:03 PM, Shawn Erickson <shawnce at gmail.com> wrote:
> Sorry for the longish code example attached to this email but I am
> trying to understand if clang is being overly pedantic in this
> situation. Also please let me know if I should just file defects
> instead of posting to this mailing list (unsure if this is a clang
> problem or not).
Usually it's okay to just file... but since we're discussing it here,
might as well continue.
I believe the issue reduces to the following:
struct A
{
operator int();
operator bool();
};
int main(int argc, char** argv) {
if (1000 == A()) {
}
}
I don't know the rules here off the top of my head...
-Eli
More information about the cfe-dev
mailing list