Use deleted members to prevent copying in Beast (RIPD-268)

This commit is contained in:
Nik Bougalis
2014-09-25 11:13:38 -07:00
committed by Vinnie Falco
parent cd97b5beec
commit 60330da25c
48 changed files with 255 additions and 191 deletions

View File

@@ -20,7 +20,6 @@
#ifndef BEAST_ASIO_BASICS_SSLCONTEXT_H_INCLUDED
#define BEAST_ASIO_BASICS_SSLCONTEXT_H_INCLUDED
#include <beast/Uncopyable.h>
#include <boost/asio/ssl/context.hpp>
namespace beast {
@@ -29,7 +28,7 @@ namespace asio {
/** Simple base class for passing a context around.
This lets derived classes hide their implementation from the headers.
*/
class SSLContext : public Uncopyable
class SSLContext
{
public:
virtual ~SSLContext ();
@@ -61,6 +60,9 @@ public:
protected:
explicit SSLContext (ContextType& context);
SSLContext(SSLContext const&) = delete;
SSLContext& operator= (SSLContext const&) = delete;
ContextType& m_context;
};

View File

@@ -26,7 +26,7 @@
namespace beast {
namespace asio {
class HTTPClientType : public HTTPClientBase, public Uncopyable
class HTTPClientType : public HTTPClientBase
{
public:
class Session;
@@ -61,6 +61,9 @@ public:
{
}
HTTPClientType(HTTPClientType const&) = delete;
HTTPClientType& operator= (HTTPClientType const&) = delete;
~HTTPClientType ()
{
cancel();