http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60852
Nicolas Silvagni <galopin at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |galopin at gmail dot com --- Comment #13 from Nicolas Silvagni <galopin at gmail dot com> --- Clang is wrong, only operator taking E or reference to E can contribute. In 13.3.1.2 §3 For a unary operator @ with an operand of a type whose cv-unqualified version is T1, and for a binary operator @ with a left operand of a type whose cv-unqualified version is T1 and a right operand of a type whose cv-unqualified version is T2, three sets of candidate functions, designated member candidates, nonmember candidates and built-in candidates, are constructed as follows: Follow by : However, if no operand has a class type, only those non-member functions in the lookup set that have a first parameter of type T1 or “reference to (possibly cv-qualified) T1”, when T1 is an enumeration type, or (if there is a right operand) a second parameter of type T2 or “reference to (possibly cv-qualified) T2”, when T2 is an enumeration type, are candidate functions.