Explicitly delete copy construction and assignment for derived socket classes.

This commit is contained in:
Christopher Kohlhoff 2020-07-01 12:53:11 +10:00
parent c9dde400d2
commit 2442078aa1
4 changed files with 18 additions and 0 deletions

View File

@ -1066,6 +1066,11 @@ public:
}
private:
// Disallow copying and assignment.
basic_datagram_socket(const basic_datagram_socket&) ASIO_DELETED;
basic_datagram_socket& operator=(
const basic_datagram_socket&) ASIO_DELETED;
class initiate_async_send
{
public:

View File

@ -1058,6 +1058,10 @@ public:
}
private:
// Disallow copying and assignment.
basic_raw_socket(const basic_raw_socket&) ASIO_DELETED;
basic_raw_socket& operator=(const basic_raw_socket&) ASIO_DELETED;
class initiate_async_send
{
public:

View File

@ -679,6 +679,11 @@ public:
}
private:
// Disallow copying and assignment.
basic_seq_packet_socket(const basic_seq_packet_socket&) ASIO_DELETED;
basic_seq_packet_socket& operator=(
const basic_seq_packet_socket&) ASIO_DELETED;
class initiate_async_send
{
public:

View File

@ -973,6 +973,10 @@ public:
}
private:
// Disallow copying and assignment.
basic_stream_socket(const basic_stream_socket&) ASIO_DELETED;
basic_stream_socket& operator=(const basic_stream_socket&) ASIO_DELETED;
class initiate_async_send
{
public: