summaryrefslogtreecommitdiffstats
path: root/staging_vespalib
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib')
-rw-r--r--staging_vespalib/src/vespa/vespalib/objects/identifiable.hpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/objects/identifiable.hpp b/staging_vespalib/src/vespa/vespalib/objects/identifiable.hpp
index ad31712ede9..2c34ba306ab 100644
--- a/staging_vespalib/src/vespa/vespalib/objects/identifiable.hpp
+++ b/staging_vespalib/src/vespa/vespalib/objects/identifiable.hpp
@@ -51,6 +51,15 @@ public:
IdentifiablePtr(const IdentifiablePtr &) = default;
IdentifiablePtr & operator = (const IdentifiablePtr &) = default;
IdentifiablePtr(T * p=NULL) : CloneablePtr<T>(p) { }
+ IdentifiablePtr(std::unique_ptr<T> &&rhs)
+ : CloneablePtr<T>(std::move(rhs))
+ {
+ }
+ IdentifiablePtr &operator=(std::unique_ptr<T> &&rhs)
+ {
+ CloneablePtr<T>::operator=(std::move(rhs));
+ return *this;
+ }
int cmp(const IdentifiablePtr<T> &rhs) const {
const T *a = this->get();
const T *b = rhs.get();