From 1394b1ccc8cfee2846b1a38d409717e821113cf3 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 10 Feb 2020 14:45:40 +0300 Subject: [PATCH] DenseMap: add workaround for C++2a builds Hide operator != --- include/llvm/ADT/DenseMap.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/llvm/ADT/DenseMap.h b/include/llvm/ADT/DenseMap.h index 948a6e6bfb3..50c0bf1c3d5 100644 --- a/include/llvm/ADT/DenseMap.h +++ b/include/llvm/ADT/DenseMap.h @@ -1219,6 +1219,8 @@ public: "comparing incomparable iterators!"); return Ptr == RHS.Ptr; } +#if __cpp_impl_three_way_comparison >= 201711 +#else bool operator!=(const ConstIterator &RHS) const { assert((!Ptr || isHandleInSync()) && "handle not in sync!"); assert((!RHS.Ptr || RHS.isHandleInSync()) && "handle not in sync!"); @@ -1226,6 +1228,7 @@ public: "comparing incomparable iterators!"); return Ptr != RHS.Ptr; } +#endif inline DenseMapIterator& operator++() { // Preincrement assert(isHandleInSync() && "invalid iterator access!");