File: 0001-Fix-recursive-operator-call-in-C-20-1846.patch

package info (click to toggle)
rapidjson 1.1.0%2Bdfsg2-7.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,264 kB
  • sloc: cpp: 18,852; ansic: 2,434; python: 235; xml: 182; sh: 83; makefile: 10; javascript: 2
file content (32 lines) | stat: -rw-r--r-- 1,090 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 24ebd51287f7f3f6aca11a3c7cc8eea8110c10ce Mon Sep 17 00:00:00 2001
From: Laurent Stacul <laurent.stacul@amadeus.com>
Date: Mon, 22 Feb 2021 16:11:42 +0000
Subject: [PATCH] Fix recursive operator== call in C++20 (#1846)

---
 include/rapidjson/document.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
index 028235ec..09101229 100644
--- a/include/rapidjson/document.h
+++ b/include/rapidjson/document.h
@@ -1083,6 +1083,7 @@ public:
      */
     template <typename T> RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& rhs) const { return !(*this == rhs); }
 
+#ifndef __cpp_lib_three_way_comparison
     //! Equal-to operator with arbitrary types (symmetric version)
     /*! \return (rhs == lhs)
      */
@@ -1093,6 +1094,7 @@ public:
      */
     template <typename T> friend RAPIDJSON_DISABLEIF_RETURN((internal::IsGenericValue<T>), (bool)) operator!=(const T& lhs, const GenericValue& rhs) { return !(rhs == lhs); }
     //@}
+#endif
 
     //!@name Type
     //@{
-- 
2.45.2