Skip to content

Commit

Permalink
Fix build with C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed May 23, 2021
1 parent b9e76db commit 3e761b5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion websocketpp/endpoint.hpp
Expand Up @@ -111,7 +111,7 @@ class endpoint : public config::transport_type, public config::endpoint_base {


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

#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
// no copy constructor because endpoints are not copyable
Expand Down
14 changes: 7 additions & 7 deletions websocketpp/logger/basic.hpp
Expand Up @@ -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<concurrency,names> const & other)
: m_static_channels(other.m_static_channels)
, m_dynamic_channels(other.m_dynamic_channels)
, m_out(other.m_out)
Expand All @@ -97,7 +97,7 @@ class basic {

#ifdef _WEBSOCKETPP_MOVE_SEMANTICS_
/// Move constructor
basic<concurrency,names>(basic<concurrency,names> && other)
basic(basic<concurrency,names> && other)
: m_static_channels(other.m_static_channels)
, m_dynamic_channels(other.m_dynamic_channels)
, m_out(other.m_out)
Expand Down
6 changes: 3 additions & 3 deletions websocketpp/roles/server_endpoint.hpp
Expand Up @@ -75,19 +75,19 @@ class server : public endpoint<connection<config>,config> {
}

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

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

// no copy assignment operator because endpoints are not copyable
server<config> & operator=(server<config> const &) = delete;
#endif // _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_

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

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

0 comments on commit 3e761b5

Please sign in to comment.