Skip to content

Commit

Permalink
(conan-io#15295) websocketpp: support gcc 12
Browse files Browse the repository at this point in the history
* websocketpp: support gcc 12

* add patch_source
  • Loading branch information
toge authored and StellaSmith committed Feb 2, 2023
1 parent e00be58 commit db0c131
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 1 deletion.
9 changes: 9 additions & 0 deletions recipes/websocketpp/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ sources:
url: "https://github.com/zaphoyd/websocketpp/archive/0.8.1.tar.gz"
sha256: "178899de48c02853b55b1ea8681599641cedcdfce59e56beaff3dd0874bf0286"
patches:
"0.8.2":
- patch_file: "patches/support-gcc-12.patch"
patch_type: "portability"
patch_description: "support gcc 12"
patch_source: "https://github.com/zaphoyd/websocketpp/issues/991"
"0.8.1":
- patch_file: "patches/websocket_boost_support_1_7_x.patch"
patch_type: "conan"
patch_description: "Boost 1.70+ support: Mostly captures zaphoyd/websocketpp#814"
- patch_file: "patches/support-gcc-12.patch"
patch_type: "portability"
patch_description: "support gcc 12"
patch_source: "https://github.com/zaphoyd/websocketpp/issues/991"
2 changes: 1 addition & 1 deletion recipes/websocketpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def requirements(self):
if self.options.asio == "standalone":
self.requires("asio/1.24.0", transitive_headers=True)
elif self.options.asio == "boost":
self.requires("boost/1.80.0", transitive_headers=True)
self.requires("boost/1.81.0", transitive_headers=True)

def package_id(self):
self.info.clear()
Expand Down
93 changes: 93 additions & 0 deletions recipes/websocketpp/all/patches/support-gcc-12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
diff --git a/websocketpp/endpoint.hpp b/websocketpp/endpoint.hpp
index c124b1d..9ce8a62 100644
--- a/websocketpp/endpoint.hpp
+++ b/websocketpp/endpoint.hpp
@@ -109,7 +109,7 @@ public:


/// Destructor
- ~endpoint<connection,config>() {}
+ ~endpoint() {}

#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
// no copy constructor because endpoints are not copyable
diff --git a/websocketpp/logger/basic.hpp b/websocketpp/logger/basic.hpp
index 8451413..51efa94 100644
--- a/websocketpp/logger/basic.hpp
+++ b/websocketpp/logger/basic.hpp
@@ -58,33 +58,33 @@ namespace log {
template <typename concurrency, typename names>
class basic {
public:
- basic<concurrency,names>(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<concurrency,names>(std::ostream * out)
+ basic(std::ostream * out)
: m_static_channels(0xffffffff)
, m_dynamic_channels(0)
, m_out(out) {}

- basic<concurrency,names>(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<concurrency,names>(level c, std::ostream * out)
+ basic(level c, std::ostream * out)
: m_static_channels(c)
, m_dynamic_channels(0)
, m_out(out) {}

/// Destructor
- ~basic<concurrency,names>() {}
+ ~basic() {}

/// Copy constructor
- basic<concurrency,names>(basic<concurrency,names> 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<concurrency,names>(basic<concurrency,names> && 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/websocketpp/roles/server_endpoint.hpp b/websocketpp/roles/server_endpoint.hpp
index 9cc652f..ad8f403 100644
--- a/websocketpp/roles/server_endpoint.hpp
+++ b/websocketpp/roles/server_endpoint.hpp
@@ -72,11 +72,11 @@ public:
}

/// Destructor
- ~server<config>() {}
+ ~server() {}

#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
// no copy constructor because endpoints are not copyable
- server<config>(server<config> &) = delete;
+ server(server&) = delete;

// no copy assignment operator because endpoints are not copyable
server<config> & operator=(server<config> const &) = delete;
@@ -84,7 +84,7 @@ public:

#ifdef _WEBSOCKETPP_MOVE_SEMANTICS_
/// Move constructor
- server<config>(server<config> && o) : endpoint<connection<config>,config>(std::move(o)) {}
+ server(server&& o) : endpoint<connection<config>,config>(std::move(o)) {}

#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
// no move assignment operator because of const member variables

0 comments on commit db0c131

Please sign in to comment.