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] 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 c124b1d9ab..9ce8a62614 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 84514130e7..4c9d836493 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 9cc652f75c..63b200a54d 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