From 69fca74d3c1278b0ecd8dd155152ce3ab119e9af Mon Sep 17 00:00:00 2001 From: rexy712 Date: Tue, 24 May 2022 17:32:46 -0700 Subject: [PATCH] Update to C++20 --- rjp++/CMakeLists.txt | 2 +- rjp++/include/string.hpp | 4 ++-- rjp++/tests/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rjp++/CMakeLists.txt b/rjp++/CMakeLists.txt index 819d395..9ea6063 100644 --- a/rjp++/CMakeLists.txt +++ b/rjp++/CMakeLists.txt @@ -52,7 +52,7 @@ if(BUILD_TESTS) endif() -target_compile_options(rjp++ PUBLIC -Wall -Wextra -pedantic -std=c++17 ${LIBREXY_CFLAGS_OTHER}) +target_compile_options(rjp++ PUBLIC -Wall -Wextra -pedantic -std=c++20 ${LIBREXY_CFLAGS_OTHER}) target_include_directories(rjp++ PUBLIC ${LIBREXY_INCLUDE_DIRS}) target_link_libraries(rjp++ PUBLIC rjp ${LIBREXY_LINK_LIBRARIES}) diff --git a/rjp++/include/string.hpp b/rjp++/include/string.hpp index f114249..a37f6af 100644 --- a/rjp++/include/string.hpp +++ b/rjp++/include/string.hpp @@ -25,8 +25,8 @@ namespace rjp{ namespace detail{ - struct allocator - { + struct allocator{ + using value_type = char; using size_type = size_t; using pointer = char*; using const_pointer = const char*; diff --git a/rjp++/tests/CMakeLists.txt b/rjp++/tests/CMakeLists.txt index e618247..baf4f5e 100644 --- a/rjp++/tests/CMakeLists.txt +++ b/rjp++/tests/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0.2) project(rjp++_tests) set(INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../include) include_directories("${INCLUDE_PATH}") -add_compile_options(-Wall -Wextra -pedantic -std=c++17) +add_compile_options(-Wall -Wextra -pedantic -std=c++20) link_libraries(rjp++ rjp) if(ENABLE_PROFILING)