From 0e528c37b75a4875c71e93c82542518956ddabc1 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 24 Jan 2024 11:33:42 +0200 Subject: [PATCH] Update supported C++ standards to C++23 and C++20 (dropping C++17) C++23 has passed all the ballots [1]. We can therefore support it now formally. This means that C++17 is no longer supported, and C++20 is supported until C++26 is released. The primary benefit of C++23 support is that we can now use coroutines in core Seastar code, as all supported C++ versions have them. [1] https://lists.isocpp.org/std-proposals/2024/01/8880.php --- .circleci/config.yml | 6 +++--- CMakeLists.txt | 2 +- configure.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae88af07418..dacc635abbb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -71,7 +71,7 @@ workflows: matrix: parameters: compiler: ["clang++-17", "g++-13"] - standard: ["20", "17"] + standard: ["23", "20"] mode: ["dev", "debug", "release"] # only build this combination with dpdk enabled, so we don't double # the size of the test matrix, and can at least test the build with @@ -80,7 +80,7 @@ workflows: matrix: parameters: compiler: ["clang++-17"] - standard: ["20"] + standard: ["23"] mode: ["release"] with_dpdk: [ "enable-dpdk" ] # only build this combination with C++20 moduels enabled, so we don't double @@ -90,6 +90,6 @@ workflows: matrix: parameters: compiler: ["clang++-17"] - standard: ["20"] + standard: ["23"] mode: ["debug"] with_modules: [ "enable-modules" ] diff --git a/CMakeLists.txt b/CMakeLists.txt index 785c3a6ff3d..0cec62ccba9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,7 +141,7 @@ set (CMAKE_CXX_FLAGS_SANITIZE FORCE) set (CMAKE_CXX_STANDARD - "20" + "23" CACHE STRING "C++ standard to build with.") diff --git a/configure.py b/configure.py index 85eed5f663a..3e67bcb7232 100755 --- a/configure.py +++ b/configure.py @@ -159,7 +159,7 @@ def identify_best_standard(cpp_standards, compiler): if args.cpp_standard == '': - cpp_standards = ['23', '20', '17'] + cpp_standards = ['23', '20'] args.cpp_standard = identify_best_standard(cpp_standards, compiler=args.cxx)