Browse Source

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

tags/3.3
Vsevolod Stakhov 1 year ago
parent
commit
ef699ea4d7
No account linked to committer's email address
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      CMakeLists.txt
  2. 2
    2
      src/libserver/html/html.cxx

+ 1
- 1
CMakeLists.txt View File



# This is supported merely with cmake 3.1 # This is supported merely with cmake 3.1
SET(CMAKE_C_STANDARD 11) SET(CMAKE_C_STANDARD 11)
SET(CMAKE_CXX_STANDARD 17)
SET(CMAKE_CXX_STANDARD 20)
SET(CMAKE_C_STANDARD_REQUIRED ON) SET(CMAKE_C_STANDARD_REQUIRED ON)
SET(CMAKE_CXX_STANDARD_REQUIRED ON) SET(CMAKE_CXX_STANDARD_REQUIRED ON)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/") LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/")

+ 2
- 2
src/libserver/html/html.cxx View File



if (c == '\0') { if (c == '\0') {
/* Replace with u0FFD */ /* Replace with u0FFD */
parser_env.buf.append(u8"\uFFFD");
parser_env.buf.append((const char *)u8"\uFFFD");
} }
else { else {
parser_env.buf.push_back(c); parser_env.buf.push_back(c);
const auto last = input.cend(); const auto last = input.cend();
for (auto it = input.cbegin(); it != last; ++it) { for (auto it = input.cbegin(); it != last; ++it) {
if (*it == '\0') { if (*it == '\0') {
output.append(u8"\uFFFD");
output.append((const char *)u8"\uFFFD");
} }
else { else {
output.push_back(*it); output.push_back(*it);

Loading…
Cancel
Save