https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68258
Bug ID: 68258 Summary: core 879 Missing built-in comparison operators for pointer types not supported Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: derrick at ca dot ibm.com Target Milestone: --- 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; ^