http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#879 not implemented, while clang3.6 works. Code: #include <cstddef> struct X_ { operator std::nullptr_t() { return nullptr; } }; struct Y_ { operator std::nullptr_t() { return nullptr; } }; int main() { X_ x; Y_ y; bool z = x != y; return 0; } Compile error: main.cpp: In function 'int main()': main.cpp:15:28: error: no match for 'operator!=' (operand types are 'X_' and 'Y_') bool z = x != y; ^
Confirmed.
Fixed in GCC 11 by r11-467: * call.c (add_builtin_candidate) <case EQ_EXPR>: Create candidate operator functions when type is std::nullptr_t for ==/!=.