]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cmake: upgrade CMAKE_CXX_STANDARD from 20 to 23 64426/head
authorKefu Chai <tchaikov@gmail.com>
Wed, 9 Jul 2025 05:16:36 +0000 (13:16 +0800)
committerKefu Chai <tchaikov@gmail.com>
Wed, 9 Jul 2025 05:16:36 +0000 (13:16 +0800)
commit36badc97ae95c154824cc0ff3335caabdea00ad8
treedf57fa270c413be7ba19cb42874a521cea21f018
parent7c523c49b1b700d5b4d231ec077be7e33d40d42c
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 (0e5a51b6) and
libstdc++ from GCC-11, which provide sufficient C++23 feature coverage
for our needs.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/CMakeLists.txt