[Bug c++/68258] New: core 879 Missing built-in comparison operators for pointer types not supported
derrick at ca dot ibm.com
gcc-bugzilla@gcc.gnu.org
Mon Nov 9 18:05:00 GMT 2015
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;
^
More information about the Gcc-bugs
mailing list