From 0396cf467b1cbd68779db200ff390e4330160254 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 30 Jun 2021 17:00:42 -0400 Subject: [PATCH] Restore C++17 compatibility --- CMakeLists.txt | 2 +- include/nod/OSUTF.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 26ca88c..ec84d73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -52,7 +52,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/DEBUG /RELEASE /LTCG /OPT:REF /OPT:ICF /INCREMENTAL:NO /DEBUGTYPE:cv,fixup") endif() else() - set(CMAKE_CXX_STANDARD 20) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) endif() endif() diff --git a/include/nod/OSUTF.h b/include/nod/OSUTF.h index e50f28d..0d78571 100644 --- a/include/nod/OSUTF.h +++ b/include/nod/OSUTF.h @@ -1,5 +1,10 @@ #ifdef __cplusplus #include +#include + +#if !__cpp_char8_t +using char8_t = uint8_t; +#endif #define OS_CONSTEXPR constexpr