channel should be movable
This commit is contained in:
parent
3d33332c23
commit
31f6a18f37
|
|
@ -22,9 +22,9 @@ class Channel
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* The implementation for the channel
|
* The implementation for the channel
|
||||||
* @var ChannelImpl
|
* @var std::unique_ptr<ChannelImpl>
|
||||||
*/
|
*/
|
||||||
std::shared_ptr<ChannelImpl> _implementation;
|
std::unique_ptr<ChannelImpl> _implementation;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
|
|
@ -47,6 +47,12 @@ public:
|
||||||
*/
|
*/
|
||||||
Channel(const Channel &channel) = delete;
|
Channel(const Channel &channel) = delete;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* But movement _is_ allowed
|
||||||
|
* @param channel
|
||||||
|
*/
|
||||||
|
Channel(Channel &&channel) : _implementation(std::move(channel._implementation)) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue