Summary:
_is_chartype_l (needed for isxdigit_l) in MinGW compares locale_t and NULL.
NULL is 'long long' for 64-bit, and this results in ambiguous overloads when
compiled with Clang. Define a concrete overload for the operators to fix the
ambiguity.
Reviewers: mstorsjo, EricWF, srhines, danalbert
Subscribers: christof, cfe-commits, ldionne
Differential Revision: https://reviews.llvm.org/D48749
llvm-svn: 336141
return __left.__locale == nullptr && __right == 0;
}
+ friend bool operator==(const locale_t& __left, long long __right) {
+ return __left.__locale == nullptr && __right == 0;
+ }
+
friend bool operator==(const locale_t& __left, std::nullptr_t) {
return __left.__locale == nullptr;
}
return !(__left == __right);
}
+ friend bool operator!=(const locale_t& __left, long long __right) {
+ return !(__left == __right);
+ }
+
friend bool operator!=(const locale_t& __left, std::nullptr_t __right) {
return !(__left == __right);
}