From 371c47f14ab8068fc51da12a50ade7f3bbe405bb Mon Sep 17 00:00:00 2001 From: Michael Bleis Date: Mon, 7 Apr 2025 12:48:34 +0200 Subject: [PATCH 1/2] fix(jsoncpp): always set JSONCPP_HAS_STRING_VIEW to 1 --- include/json/value.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/json/value.h b/include/json/value.h index 5f6544329..46cd159a0 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -39,9 +39,7 @@ #endif #endif -#if __cplusplus >= 201703L #define JSONCPP_HAS_STRING_VIEW 1 -#endif #include #include From d530bdd0051c3b9bba41f7c44ab16df3992ca39b Mon Sep 17 00:00:00 2001 From: Michael Bleis Date: Mon, 7 Apr 2025 12:55:00 +0200 Subject: [PATCH 2/2] fix(jsoncpp): compile library with C++20 support --- CMakeLists.txt | 4 ++-- include/json/value.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ab9c52a2..76bc8a0e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,9 +40,9 @@ foreach(pold "") # Currently Empty endif() endforeach() -# Build the library with C++11 standard support, independent from other including +# Build the library with C++20 standard support, independent from other including # software which may use a different CXX_STANDARD or CMAKE_CXX_STANDARD. -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/include/json/value.h b/include/json/value.h index 46cd159a0..5f6544329 100644 --- a/include/json/value.h +++ b/include/json/value.h @@ -39,7 +39,9 @@ #endif #endif +#if __cplusplus >= 201703L #define JSONCPP_HAS_STRING_VIEW 1 +#endif #include #include