Skip to content

Commit d530bdd

Browse files
author
Michael Bleis
committed
fix(jsoncpp): compile library with C++20 support
1 parent 371c47f commit d530bdd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ foreach(pold "") # Currently Empty
4040
endif()
4141
endforeach()
4242

43-
# Build the library with C++11 standard support, independent from other including
43+
# Build the library with C++20 standard support, independent from other including
4444
# software which may use a different CXX_STANDARD or CMAKE_CXX_STANDARD.
45-
set(CMAKE_CXX_STANDARD 11)
45+
set(CMAKE_CXX_STANDARD 20)
4646
set(CMAKE_CXX_EXTENSIONS OFF)
4747
set(CMAKE_CXX_STANDARD_REQUIRED ON)
4848

include/json/value.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
#endif
4040
#endif
4141

42+
#if __cplusplus >= 201703L
4243
#define JSONCPP_HAS_STRING_VIEW 1
44+
#endif
4345

4446
#include <array>
4547
#include <exception>

0 commit comments

Comments
 (0)