Fix RapidJSON compatibility with newer compilers
This commit is contained in:
1 parent
30039fa8ff
commit
3cbeb5340c
4 files changed
+30
-2
No files matched your search
+3
-1
@@ -401,13 +401,15 @@ RUN git clone --branch=json-c-0.19-20260627 --depth=1 https://github.com/json-c/
|
||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||
&& rm -rf build src
|
||||
|
||||
COPY rapidjson-generic-string-ref-assignment.patch /tmp/
|
||||
RUN git clone --branch=v1.1.0 --depth=1 https://github.com/Tencent/rapidjson.git src \
|
||||
&& git -C src apply /tmp/rapidjson-generic-string-ref-assignment.patch \
|
||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||
-DRAPIDJSON_BUILD_DOC=OFF \
|
||||
-DRAPIDJSON_BUILD_EXAMPLES=OFF \
|
||||
-DRAPIDJSON_BUILD_TESTS=OFF \
|
||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||
&& rm -rf build src
|
||||
&& rm -rf build src /tmp/rapidjson-generic-string-ref-assignment.patch
|
||||
|
||||
RUN git clone --branch=curl-8_21_0 --depth=1 https://github.com/curl/curl.git src \
|
||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
|
||||
index e3e20df..6d4c1a4 100644
|
||||
--- a/include/rapidjson/document.h
|
||||
+++ b/include/rapidjson/document.h
|
||||
@@ -317,6 +317,6 @@ struct GenericStringRef {
|
||||
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
|
||||
|
||||
- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
|
||||
+ GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
|
||||
|
||||
//! implicit conversion to plain CharType pointer
|
||||
operator const Ch *() const { return s; }
|
||||
@@ -409,13 +409,15 @@ RUN git clone --branch=json-c-0.19-20260627 --depth=1 https://github.com/json-c/
|
||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||
&& rm -rf build src
|
||||
|
||||
COPY rapidjson-generic-string-ref-assignment.patch /tmp/
|
||||
RUN git clone --branch=v1.1.0 --depth=1 https://github.com/Tencent/rapidjson.git src \
|
||||
&& git -C src apply /tmp/rapidjson-generic-string-ref-assignment.patch \
|
||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||
-DRAPIDJSON_BUILD_DOC=OFF \
|
||||
-DRAPIDJSON_BUILD_EXAMPLES=OFF \
|
||||
-DRAPIDJSON_BUILD_TESTS=OFF \
|
||||
&& cmake --build build --parallel "$(nproc)" --target install \
|
||||
&& rm -rf build src
|
||||
&& rm -rf build src /tmp/rapidjson-generic-string-ref-assignment.patch
|
||||
|
||||
RUN git clone --branch=curl-8_21_0 --depth=1 https://github.com/curl/curl.git src \
|
||||
&& cmake -G Ninja -S src -B build -DCMAKE_BUILD_TYPE=Release \
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h
|
||||
index e3e20df..6d4c1a4 100644
|
||||
--- a/include/rapidjson/document.h
|
||||
+++ b/include/rapidjson/document.h
|
||||
@@ -317,6 +317,6 @@ struct GenericStringRef {
|
||||
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
|
||||
|
||||
- GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
|
||||
+ GenericStringRef& operator=(const GenericStringRef& rhs) /* = delete */;
|
||||
|
||||
//! implicit conversion to plain CharType pointer
|
||||
operator const Ch *() const { return s; }
|
||||
Reference in new issue
Block a user