From 5040201a03eac8caeb9771af32e4487c1f100078 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 7 May 2025 17:33:40 -0400 Subject: [PATCH 1/4] update wspp version from 0.8.1 to 0.8.2 --- subprojects/websocketpp/websocketpp/common/thread.hpp | 2 +- .../websocketpp/transport/asio/connection.hpp | 10 +++++----- .../websocketpp/transport/asio/endpoint.hpp | 10 +++------- .../websocketpp/transport/asio/security/none.hpp | 3 +-- .../websocketpp/transport/asio/security/tls.hpp | 3 +-- subprojects/websocketpp/websocketpp/version.hpp | 4 ++-- 6 files changed, 13 insertions(+), 19 deletions(-) diff --git a/subprojects/websocketpp/websocketpp/common/thread.hpp b/subprojects/websocketpp/websocketpp/common/thread.hpp index 9cf959ce0..1b0472aa6 100644 --- a/subprojects/websocketpp/websocketpp/common/thread.hpp +++ b/subprojects/websocketpp/websocketpp/common/thread.hpp @@ -36,7 +36,7 @@ #if defined _WEBSOCKETPP_CPP11_INTERNAL_ && !defined _WEBSOCKETPP_NO_CPP11_THREAD_ // MinGW by default does not support C++11 thread/mutex so even if the // internal check for C++11 passes, ignore it if we are on MinGW - #if (!defined(__MINGW32__) && !defined(__MINGW64__)) || __MINGW64_VERSION_MAJOR>=6 + #if (!defined(__MINGW32__) && !defined(__MINGW64__)) #ifndef _WEBSOCKETPP_CPP11_THREAD_ #define _WEBSOCKETPP_CPP11_THREAD_ #endif diff --git a/subprojects/websocketpp/websocketpp/transport/asio/connection.hpp b/subprojects/websocketpp/websocketpp/transport/asio/connection.hpp index 60f88a79f..57dda74a2 100644 --- a/subprojects/websocketpp/websocketpp/transport/asio/connection.hpp +++ b/subprojects/websocketpp/websocketpp/transport/asio/connection.hpp @@ -311,9 +311,10 @@ public: * needed. */ timer_ptr set_timer(long duration, timer_handler callback) { - timer_ptr new_timer = lib::make_shared( - lib::ref(*m_io_service), - lib::asio::milliseconds(duration) + timer_ptr new_timer( + new lib::asio::steady_timer( + *m_io_service, + lib::asio::milliseconds(duration)) ); if (config::enable_multithreading) { @@ -461,8 +462,7 @@ protected: m_io_service = io_service; if (config::enable_multithreading) { - m_strand = lib::make_shared( - lib::ref(*io_service)); + m_strand.reset(new lib::asio::io_service::strand(*io_service)); } lib::error_code ec = socket_con_type::init_asio(io_service, m_strand, diff --git a/subprojects/websocketpp/websocketpp/transport/asio/endpoint.hpp b/subprojects/websocketpp/websocketpp/transport/asio/endpoint.hpp index ddab2c742..94509adb3 100644 --- a/subprojects/websocketpp/websocketpp/transport/asio/endpoint.hpp +++ b/subprojects/websocketpp/websocketpp/transport/asio/endpoint.hpp @@ -195,8 +195,7 @@ public: m_io_service = ptr; m_external_io_service = true; - m_acceptor = lib::make_shared( - lib::ref(*m_io_service)); + m_acceptor.reset(new lib::asio::ip::tcp::acceptor(*m_io_service)); m_state = READY; ec = lib::error_code(); @@ -688,9 +687,7 @@ public: * @since 0.3.0 */ void start_perpetual() { - m_work = lib::make_shared( - lib::ref(*m_io_service) - ); + m_work.reset(new lib::asio::io_service::work(*m_io_service)); } /// Clears the endpoint's perpetual flag, allowing it to exit when empty @@ -854,8 +851,7 @@ protected: // Create a resolver if (!m_resolver) { - m_resolver = lib::make_shared( - lib::ref(*m_io_service)); + m_resolver.reset(new lib::asio::ip::tcp::resolver(*m_io_service)); } tcon->set_uri(u); diff --git a/subprojects/websocketpp/websocketpp/transport/asio/security/none.hpp b/subprojects/websocketpp/websocketpp/transport/asio/security/none.hpp index 5c8293dbe..6c7d35241 100644 --- a/subprojects/websocketpp/websocketpp/transport/asio/security/none.hpp +++ b/subprojects/websocketpp/websocketpp/transport/asio/security/none.hpp @@ -168,8 +168,7 @@ protected: return socket::make_error_code(socket::error::invalid_state); } - m_socket = lib::make_shared( - lib::ref(*service)); + m_socket.reset(new lib::asio::ip::tcp::socket(*service)); if (m_socket_init_handler) { m_socket_init_handler(m_hdl, *m_socket); diff --git a/subprojects/websocketpp/websocketpp/transport/asio/security/tls.hpp b/subprojects/websocketpp/websocketpp/transport/asio/security/tls.hpp index c76fd9aa1..04ac37903 100644 --- a/subprojects/websocketpp/websocketpp/transport/asio/security/tls.hpp +++ b/subprojects/websocketpp/websocketpp/transport/asio/security/tls.hpp @@ -193,8 +193,7 @@ protected: if (!m_context) { return socket::make_error_code(socket::error::invalid_tls_context); } - m_socket = lib::make_shared( - _WEBSOCKETPP_REF(*service),lib::ref(*m_context)); + m_socket.reset(new socket_type(*service, *m_context)); if (m_socket_init_handler) { m_socket_init_handler(m_hdl, get_socket()); diff --git a/subprojects/websocketpp/websocketpp/version.hpp b/subprojects/websocketpp/websocketpp/version.hpp index f701ab103..5766546f7 100644 --- a/subprojects/websocketpp/websocketpp/version.hpp +++ b/subprojects/websocketpp/websocketpp/version.hpp @@ -44,7 +44,7 @@ static int const major_version = 0; /// Library minor version number static int const minor_version = 8; /// Library patch version number -static int const patch_version = 1; +static int const patch_version = 2; /// Library pre-release flag /** * This is a textual flag indicating the type and number for pre-release @@ -54,7 +54,7 @@ static int const patch_version = 1; static char const prerelease_flag[] = ""; /// Default user agent string -static char const user_agent[] = "WebSocket++/0.8.1"; +static char const user_agent[] = "WebSocket++/0.8.2"; } // namespace websocketpp From 00ac81373585af5c6474e13ec459c743a83e42b0 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 7 May 2025 18:10:30 -0400 Subject: [PATCH 2/4] manually apply cpp20 fixes from https://github.com/zaphoyd/websocketpp/pull/1060 the patch link from https://github.com/zaphoyd/websocketpp/issues/1068#issuecomment-1364647094 didn't work for some reason, so i looked at the 1060 PR the PR had 10 commits https://github.com/zaphoyd/websocketpp/pull/1060/commits, all but 2 of which seemed entirely unrelated to the cpp20 fix so i manually pulled the changes from the 2 cpp 20 related commits: * https://github.com/zaphoyd/websocketpp/pull/1060/commits/9b7fdd5b988b3b443fda60a5852173d0268d309e * https://github.com/zaphoyd/websocketpp/pull/1060/commits/0823cfea38acb9827b9d5a742b0f394ed5b30d68 Co-authored-by: Andre Azevedo --- subprojects/websocketpp/websocketpp/endpoint.hpp | 2 +- .../websocketpp/websocketpp/logger/basic.hpp | 14 +++++++------- .../websocketpp/roles/server_endpoint.hpp | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/subprojects/websocketpp/websocketpp/endpoint.hpp b/subprojects/websocketpp/websocketpp/endpoint.hpp index c124b1d9a..9ce8a6261 100644 --- a/subprojects/websocketpp/websocketpp/endpoint.hpp +++ b/subprojects/websocketpp/websocketpp/endpoint.hpp @@ -109,7 +109,7 @@ public: /// Destructor - ~endpoint() {} + ~endpoint() {} #ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_ // no copy constructor because endpoints are not copyable diff --git a/subprojects/websocketpp/websocketpp/logger/basic.hpp b/subprojects/websocketpp/websocketpp/logger/basic.hpp index 84514130e..4c9d83649 100644 --- a/subprojects/websocketpp/websocketpp/logger/basic.hpp +++ b/subprojects/websocketpp/websocketpp/logger/basic.hpp @@ -58,33 +58,33 @@ namespace log { template class basic { public: - basic(channel_type_hint::value h = + basic(channel_type_hint::value h = channel_type_hint::access) : m_static_channels(0xffffffff) , m_dynamic_channels(0) , m_out(h == channel_type_hint::error ? &std::cerr : &std::cout) {} - basic(std::ostream * out) + basic(std::ostream * out) : m_static_channels(0xffffffff) , m_dynamic_channels(0) , m_out(out) {} - basic(level c, channel_type_hint::value h = + basic(level c, channel_type_hint::value h = channel_type_hint::access) : m_static_channels(c) , m_dynamic_channels(0) , m_out(h == channel_type_hint::error ? &std::cerr : &std::cout) {} - basic(level c, std::ostream * out) + basic(level c, std::ostream * out) : m_static_channels(c) , m_dynamic_channels(0) , m_out(out) {} /// Destructor - ~basic() {} + ~basic() {} /// Copy constructor - basic(basic const & other) + basic(basic const & other) : m_static_channels(other.m_static_channels) , m_dynamic_channels(other.m_dynamic_channels) , m_out(other.m_out) @@ -97,7 +97,7 @@ public: #ifdef _WEBSOCKETPP_MOVE_SEMANTICS_ /// Move constructor - basic(basic && other) + basic(basic && other) : m_static_channels(other.m_static_channels) , m_dynamic_channels(other.m_dynamic_channels) , m_out(other.m_out) diff --git a/subprojects/websocketpp/websocketpp/roles/server_endpoint.hpp b/subprojects/websocketpp/websocketpp/roles/server_endpoint.hpp index 9cc652f75..63b200a54 100644 --- a/subprojects/websocketpp/websocketpp/roles/server_endpoint.hpp +++ b/subprojects/websocketpp/websocketpp/roles/server_endpoint.hpp @@ -72,11 +72,11 @@ public: } /// Destructor - ~server() {} + ~server() {} #ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_ // no copy constructor because endpoints are not copyable - server(server &) = delete; + server(server &) = delete; // no copy assignment operator because endpoints are not copyable server & operator=(server const &) = delete; @@ -84,7 +84,7 @@ public: #ifdef _WEBSOCKETPP_MOVE_SEMANTICS_ /// Move constructor - server(server && o) : endpoint,config>(std::move(o)) {} + server(server && o) : endpoint,config>(std::move(o)) {} #ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_ // no move assignment operator because of const member variables From b299de0bd7f90bbb2419e9f8d77f0771db4b1502 Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 7 May 2025 18:34:31 -0400 Subject: [PATCH 3/4] cpp20 fix for valijson i couldn't tell what version of valijson was in here, so i just fixed the error (it was the same as one of the errors websocketspp had) --- .../valijson/include/valijson/constraints/basic_constraint.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/valijson/include/valijson/constraints/basic_constraint.hpp b/subprojects/valijson/include/valijson/constraints/basic_constraint.hpp index 5de968318..fd149a0db 100644 --- a/subprojects/valijson/include/valijson/constraints/basic_constraint.hpp +++ b/subprojects/valijson/include/valijson/constraints/basic_constraint.hpp @@ -29,7 +29,7 @@ struct BasicConstraint: Constraint BasicConstraint(const BasicConstraint &other) : m_allocator(other.m_allocator) { } - ~BasicConstraint() override = default; + ~BasicConstraint() override = default; bool accept(ConstraintVisitor &visitor) const override { From ee7cb4ee22570b7ef86e603fdd5f70ba58b1504b Mon Sep 17 00:00:00 2001 From: briaguya <70942617+briaguya-ai@users.noreply.github.com> Date: Wed, 7 May 2025 20:24:07 -0400 Subject: [PATCH 4/4] back to 12 --- .github/workflows/generate-builds.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/generate-builds.yml b/.github/workflows/generate-builds.yml index 7fa7e21e6..45cab21d9 100644 --- a/.github/workflows/generate-builds.yml +++ b/.github/workflows/generate-builds.yml @@ -248,8 +248,8 @@ jobs: mv README.md readme.txt mv build-cmake/*.appimage soh.appimage env: - CC: gcc-14 - CXX: g++-14 + CC: gcc-12 + CXX: g++-12 - name: Upload build uses: actions/upload-artifact@v4 with: