1 Star 0 Fork 5

DengXiewei/rapidjson

forked from src-anolis-os/rapidjson 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rapidjson-1.1.0-c++20.patch 1.81 KB
一键复制 编辑 原始数据 按行查看 历史
DengXiewei 提交于 2023-04-06 16:23 . Initial package from upstream
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dengxiewei/rapidjson.git
git@gitee.com:dengxiewei/rapidjson.git
dengxiewei
rapidjson
rapidjson
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385