Add patch for C++20 support
This commit is contained in:
parent
96642c6eaf
commit
de138ed71f
|
@ -0,0 +1,31 @@
|
|||
commit c6c56d87ff12ba8100b261f371fdaa106f95fe14
|
||||
Author: Tom Hughes <tom@compton.nu>
|
||||
Date: Tue Sep 1 19:24:03 2020 +0100
|
||||
|
||||
Avoid ambiguous operator errors in C++20
|
||||
|
||||
Derived from upstream commit ebcbd04484fcdaddbb9fd7798e76bbfb4ae8f840
|
||||
|
||||
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
|
||||
index e3e20dfb..1485321d 100644
|
||||
--- a/include/rapidjson/document.h
|
||||
+++ b/include/rapidjson/document.h
|
||||
@@ -168,12 +168,12 @@ public:
|
||||
|
||||
//! @name relations
|
||||
//@{
|
||||
- bool operator==(ConstIterator that) const { return ptr_ == that.ptr_; }
|
||||
- bool operator!=(ConstIterator that) const { return ptr_ != that.ptr_; }
|
||||
- bool operator<=(ConstIterator that) const { return ptr_ <= that.ptr_; }
|
||||
- bool operator>=(ConstIterator that) const { return ptr_ >= that.ptr_; }
|
||||
- bool operator< (ConstIterator that) const { return ptr_ < that.ptr_; }
|
||||
- bool operator> (ConstIterator that) const { return ptr_ > that.ptr_; }
|
||||
+ template <bool Const_> bool operator==(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ == that.ptr_; }
|
||||
+ template <bool Const_> bool operator!=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ != that.ptr_; }
|
||||
+ template <bool Const_> bool operator<=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ <= that.ptr_; }
|
||||
+ template <bool Const_> bool operator>=(const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ >= that.ptr_; }
|
||||
+ template <bool Const_> bool operator< (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ < that.ptr_; }
|
||||
+ template <bool Const_> bool operator> (const GenericMemberIterator<Const_, Encoding, Allocator>& that) const { return ptr_ > that.ptr_; }
|
||||
//@}
|
||||
|
||||
//! @name dereference
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
Name: rapidjson
|
||||
Version: 1.1.0
|
||||
Release: 12%{?dist}
|
||||
Release: 13%{?dist}
|
||||
Summary: Fast JSON parser and generator for C++
|
||||
|
||||
License: MIT
|
||||
|
@ -10,6 +10,8 @@ URL: http://rapidjson.org/
|
|||
Source0: https://github.com/Tencent/rapidjson/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
# Downstream-patch for gtest
|
||||
Patch0: rapidjson-1.1.0-do_not_include_gtest_src_dir.patch
|
||||
# Upstream derived patch for C++20 support
|
||||
Patch1: rapidjson-1.1.0-c++20.patch
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
|
@ -115,6 +117,9 @@ ctest -V %{?_smp_mflags}
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 1 2020 Tom Hughes <tom@compton.nu> - 1.1.0-13
|
||||
- Add patch for C++20 support
|
||||
|
||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
|
|
Loading…
Reference in New Issue