scylladb / seastar

High performance server-side application framework
http://seastar.io
Apache License 2.0
8.38k stars 1.55k forks source link

build: check for P2582R1 support #2446

Closed tchaikov closed 2 months ago

tchaikov commented 2 months ago

in a recent GCC packaging update in fedora, the maintainer backported a patch PR116276 from GCC-14. the patch implements P2582R1 - Wording for class template argument deduction from inherited constructors which was accepted by C++23. since it's included by C++23, Clang is also working in this direction, see https://github.com/llvm/llvm-project/issues/92606.

this is the reason why gcc-14.2.1-3 fails to build the tree, which relies on the behavior without P2582R1.

in this change, we check for the support of P2581R1 with CMake, and define SEASTAR_P2581R1 macro if the proposed behavior is implemented. we define the argument deduction guide for rpc::tuple only if this macro is not defined. this should address the build failure. and it is future-proof as once Clang supports P2581R1, we can detect it, and disable the dedution guide as well.

Fixes #2445 Signed-off-by: Kefu Chai kefu.chai@scylladb.com

tchaikov commented 2 months ago

@scylladb/seastar-maint hello maintainers, could you help review this change?