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