commit ef699ea: [Rework] Switch minimum C++ standard version to C++20

Vsevolod Stakhov vsevolod at rspamd.com
Sun Jun 19 11:28:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-06-19 12:24:09 +0100
URL: https://github.com/rspamd/rspamd/commit/ef699ea4d7d8874397413f09d63049be89d7329a (HEAD -> master)

[Rework] Switch minimum C++ standard version to C++20

---
 CMakeLists.txt              | 2 +-
 src/libserver/html/html.cxx | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf862f500..40d88b8bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@ CMAKE_POLICY(SET CMP0075 NEW)
 
 # This is supported merely with cmake 3.1
 SET(CMAKE_C_STANDARD 11)
-SET(CMAKE_CXX_STANDARD 17)
+SET(CMAKE_CXX_STANDARD 20)
 SET(CMAKE_C_STANDARD_REQUIRED ON)
 SET(CMAKE_CXX_STANDARD_REQUIRED ON)
 LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")
diff --git a/src/libserver/html/html.cxx b/src/libserver/html/html.cxx
index a5cab7470..265a31f13 100644
--- a/src/libserver/html/html.cxx
+++ b/src/libserver/html/html.cxx
@@ -313,7 +313,7 @@ html_parse_tag_content(rspamd_mempool_t *pool,
 
 		if (c == '\0') {
 			/* Replace with u0FFD */
-			parser_env.buf.append(u8"\uFFFD");
+			parser_env.buf.append((const char *)u8"\uFFFD");
 		}
 		else {
 			parser_env.buf.push_back(c);
@@ -1052,7 +1052,7 @@ html_append_parsed(struct html_content *hc,
 				const auto last = input.cend();
 				for (auto it = input.cbegin(); it != last; ++it) {
 					if (*it == '\0') {
-						output.append(u8"\uFFFD");
+						output.append((const char *)u8"\uFFFD");
 					}
 					else {
 						output.push_back(*it);


More information about the Commits mailing list