[cfe-dev] error: use of overloaded operator '==' is ambiguous

Shawn Erickson shawnce at gmail.com
Fri Jul 30 14:55:26 PDT 2010


Thanks Doug for that analysis.

Quick question why is long double being listed in the following
diagnostic? I don't believe either type at that line are floating
point (the const Status::eNo is int64_t) unless this is some fallback
promotion.

[0:657] > flc -c issue_002.cpp
issue_002.cpp:78:21: error: use of overloaded operator '==' is ambiguous
   if (Status::eNo == bar.isEmpty()) {
       ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
issue_002.cpp:78:21: note: because of ambiguity in conversion of
'ResultCode' (aka 'ResultCodeClass') to 'long double'



More information about the cfe-dev mailing list