From bf417b32029b1ebd8941635a9f3ff74e1b036294 Mon Sep 17 00:00:00 2001 From: FelixHommel Date: Wed, 12 Nov 2025 13:30:41 +0100 Subject: [PATCH 1/4] chore: increase cmake mimimum version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9043db327..7fb8d80eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ ############ Setup project and cmake # Minimum cmake requirement. We should require a quite recent # cmake for the dependency find macros etc. to be up to date. -cmake_minimum_required (VERSION 2.8.8) +cmake_minimum_required (VERSION 3.30) ############ Paths From 468461b1b816374b453a75f55ebb8ebf9e5853bd Mon Sep 17 00:00:00 2001 From: FelixHommel Date: Wed, 12 Nov 2025 13:32:42 +0100 Subject: [PATCH 2/4] fix: resolve depracation issues with c++23 and std::aligned_storage --- websocketpp/common/type_traits.hpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/websocketpp/common/type_traits.hpp b/websocketpp/common/type_traits.hpp index c89b82b31..d49ad5abe 100644 --- a/websocketpp/common/type_traits.hpp +++ b/websocketpp/common/type_traits.hpp @@ -28,6 +28,7 @@ #ifndef WEBSOCKETPP_COMMON_TYPE_TRAITS_HPP #define WEBSOCKETPP_COMMON_TYPE_TRAITS_HPP +#include #include // If we've determined that we're in full C++11 mode and the user hasn't @@ -52,7 +53,16 @@ namespace websocketpp { namespace lib { #ifdef _WEBSOCKETPP_CPP11_TYPE_TRAITS_ - using std::aligned_storage; + template + struct aligned_storage { +#if __cplusplus >= 202300L + struct type { + alignas(std::max_align_t) unsigned char data[N]; + }; +#else + using type = typename std::aligned_storage::type; +#endif + }; using std::is_same; #else using boost::aligned_storage; From dbe119059ebfdab9b83730245eaaa2f1eecb510b Mon Sep 17 00:00:00 2001 From: FelixHommel Date: Wed, 12 Nov 2025 13:46:57 +0100 Subject: [PATCH 3/4] chore: add some explaining comments --- websocketpp/common/type_traits.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/websocketpp/common/type_traits.hpp b/websocketpp/common/type_traits.hpp index d49ad5abe..f461ef87d 100644 --- a/websocketpp/common/type_traits.hpp +++ b/websocketpp/common/type_traits.hpp @@ -53,6 +53,8 @@ namespace websocketpp { namespace lib { #ifdef _WEBSOCKETPP_CPP11_TYPE_TRAITS_ + // NOTE: this is may not be the best way to detect c++23 compilers, but it worked fine for all test I did + // std::aligned_storage has been depracated as of c++23 (see P1413R3 for more details) template struct aligned_storage { #if __cplusplus >= 202300L From 75e1a0e80f4b3314a89df960ca439eba0641a814 Mon Sep 17 00:00:00 2001 From: FelixHommel Date: Wed, 12 Nov 2025 13:49:06 +0100 Subject: [PATCH 4/4] chore: rollback cmake minimum version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fb8d80eb..9043db327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ ############ Setup project and cmake # Minimum cmake requirement. We should require a quite recent # cmake for the dependency find macros etc. to be up to date. -cmake_minimum_required (VERSION 3.30) +cmake_minimum_required (VERSION 2.8.8) ############ Paths