Skip to content

Commit 36badc9

Browse files
committed
cmake: upgrade CMAKE_CXX_STANDARD from 20 to 23
Adopt C++23 to leverage new standard library features and reduce dependencies on third-party implementations: Standard library improvements: - std::expected<> replaces third-party implementation at src/include/expected.hpp - std::flat_map/std::flat_set replace boost alternatives - std::stacktrace replaces homebrew implementation at src/common/BackTrace.h Language improvements: - Deducing this enables elimination of code duplication Benefits: - Reduced maintenance overhead - Fewer third-party dependencies - Simplified codebase This upgrade is supported by our migration to clang-19 (0e5a51b) and libstdc++ from GCC-11, which provide sufficient C++23 feature coverage for our needs. Signed-off-by: Kefu Chai <[email protected]>
1 parent 7c523c4 commit 36badc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ if(HAVE_INTEL)
241241
endif()
242242
endif()
243243

244-
# require c++20
245-
set(CMAKE_CXX_STANDARD 20)
244+
# require c++23
245+
set(CMAKE_CXX_STANDARD 23)
246246
set(CMAKE_CXX_EXTENSIONS OFF)
247247
set(CMAKE_CXX_STANDARD_REQUIRED ON)
248248
set(CMAKE_C_STANDARD 99)

0 commit comments

Comments
 (0)