Skip to content

remove redundant template decl for conatructor and destructor - required for c++20 #1175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions websocketpp/endpoint.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class endpoint : public config::transport_type, public config::endpoint_base {
public:
// Import appropriate types from our helper class
// See endpoint_types for more details.
typedef endpoint<connection,config> type;
typedef endpoint type;

/// Type of the transport component of this endpoint
typedef typename config::transport_type transport_type;
Expand Down Expand Up @@ -109,7 +109,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
18 changes: 9 additions & 9 deletions websocketpp/logger/basic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,54 +58,54 @@ 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)
{}

#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
// no copy assignment operator because of const member variables
basic<concurrency,names> & operator=(basic<concurrency,names> const &) = delete;
basic & operator=(basic<concurrency,names> const &) = delete;
#endif // _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_

#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)
{}

#ifdef _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_
// no move assignment operator because of const member variables
basic<concurrency,names> & operator=(basic<concurrency,names> &&) = delete;
basic & operator=(basic<concurrency,names> &&) = delete;
#endif // _WEBSOCKETPP_DEFAULT_DELETE_FUNCTIONS_

#endif // _WEBSOCKETPP_MOVE_SEMANTICS_
Expand Down