|
@@ -112,9 +112,14 @@ public:
|
|
CheshireCat(impl_ptr<T> impl) : mImpl(std::move(impl)) {}
|
|
CheshireCat(impl_ptr<T> impl) : mImpl(std::move(impl)) {}
|
|
template <typename... Args>
|
|
template <typename... Args>
|
|
CheshireCat(Args... args) : mImpl(std::make_shared<T>(std::move(args)...)) {}
|
|
CheshireCat(Args... args) : mImpl(std::make_shared<T>(std::move(args)...)) {}
|
|
|
|
+ CheshireCat(CheshireCat<T> &&cc) { *this = std::move(cc); }
|
|
|
|
+ CheshireCat(const CheshireCat<T> &) = delete;
|
|
|
|
|
|
virtual ~CheshireCat() = default;
|
|
virtual ~CheshireCat() = default;
|
|
|
|
|
|
|
|
+ CheshireCat &operator=(CheshireCat<T> &&cc) { mImpl = std::move(cc->mImpl); };
|
|
|
|
+ CheshireCat &operator=(const CheshireCat<T> &) = delete;
|
|
|
|
+
|
|
protected:
|
|
protected:
|
|
impl_ptr<T> impl() { return mImpl; }
|
|
impl_ptr<T> impl() { return mImpl; }
|
|
impl_ptr<const T> impl() const { return mImpl; }
|
|
impl_ptr<const T> impl() const { return mImpl; }
|