tcpchannel should also be movable

This commit is contained in:
Michael van der Werve 2018-08-31 15:01:10 +02:00
parent 9d23e44071
commit 757feb10c6
2 changed files with 13 additions and 1 deletions

View File

@ -24,7 +24,7 @@ private:
* The implementation for the channel
* @var std::unique_ptr<ChannelImpl>
*/
std::unique_ptr<ChannelImpl> _implementation;
std::shared_ptr<ChannelImpl> _implementation;
public:
/**

View File

@ -38,6 +38,18 @@ public:
* Destructor
*/
virtual ~TcpChannel() {}
/**
* Copying is not allowed.
* @param other
*/
TcpChannel(const TcpChannel &other) = delete;
/**
* But movement is allowed
* @param other
*/
TcpChannel(TcpChannel &&other) = default;
};
/**