]> source.dussan.org Git - rspamd.git/commitdiff
[Rework] Switch minimum C++ standard version to C++20
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 19 Jun 2022 11:24:09 +0000 (12:24 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sun, 19 Jun 2022 11:24:09 +0000 (12:24 +0100)
CMakeLists.txt
src/libserver/html/html.cxx

index bf862f5000ecf64ecc92a7f873564fd2f363f59e..40d88b8bb838100367de99b24e3510e8973054a0 100644 (file)
@@ -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/")
index a5cab7470fef6aa0840c7004fbbb8b69e3536651..265a31f13e8a5886c26766a6a5f286de2ab9fadd 100644 (file)
@@ -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);