mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
DenseMap: add workaround for C++2a builds
Hide operator !=
This commit is contained in:
parent
c9f0684580
commit
9eac890236
@ -1244,6 +1244,10 @@ public:
|
|||||||
return Ptr;
|
return Ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wambiguous-reversed-operator"
|
||||||
|
#endif
|
||||||
bool operator==(const ConstIterator &RHS) const {
|
bool operator==(const ConstIterator &RHS) const {
|
||||||
assert((!Ptr || isHandleInSync()) && "handle not in sync!");
|
assert((!Ptr || isHandleInSync()) && "handle not in sync!");
|
||||||
assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!");
|
assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!");
|
||||||
@ -1251,6 +1255,11 @@ public:
|
|||||||
"comparing incomparable iterators!");
|
"comparing incomparable iterators!");
|
||||||
return Ptr == RHS.Ptr;
|
return Ptr == RHS.Ptr;
|
||||||
}
|
}
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
#if __cpp_impl_three_way_comparison >= 201711
|
||||||
|
#else
|
||||||
bool operator!=(const ConstIterator &RHS) const {
|
bool operator!=(const ConstIterator &RHS) const {
|
||||||
assert((!Ptr || isHandleInSync()) && "handle not in sync!");
|
assert((!Ptr || isHandleInSync()) && "handle not in sync!");
|
||||||
assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!");
|
assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!");
|
||||||
@ -1258,6 +1267,7 @@ public:
|
|||||||
"comparing incomparable iterators!");
|
"comparing incomparable iterators!");
|
||||||
return Ptr != RHS.Ptr;
|
return Ptr != RHS.Ptr;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
inline DenseMapIterator& operator++() { // Preincrement
|
inline DenseMapIterator& operator++() { // Preincrement
|
||||||
assert(isHandleInSync() && "invalid iterator access!");
|
assert(isHandleInSync() && "invalid iterator access!");
|
||||||
|
Loading…
Reference in New Issue
Block a user