diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-09-07 16:11:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-07 16:11:38 +0200 |
commit | b2840c8baef5b6ad6bdc8b14fecfb7d69db37a33 (patch) | |
tree | ca746d1199c16282e13f26cccdfd30894f7ac939 /vespalib | |
parent | fa7e942f65ca9c9be35c434bafb4a765ca5b7c50 (diff) |
Revert "Revert "Unify access to assets needed during rank-setup.""
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/varholder.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/vespalib/src/vespa/vespalib/util/varholder.h b/vespalib/src/vespa/vespalib/util/varholder.h index d92c00e0081..c9bd9f1641a 100644 --- a/vespalib/src/vespa/vespalib/util/varholder.h +++ b/vespalib/src/vespa/vespalib/util/varholder.h @@ -13,10 +13,10 @@ class VarHolder mutable std::mutex _lock; public: VarHolder() : _v(), _lock() {} - explicit VarHolder(const T &v) : _v(v), _lock() {} + explicit VarHolder(T v) : _v(std::move(v)), _lock() {} VarHolder(const VarHolder &) = delete; VarHolder & operator = (const VarHolder &) = delete; - ~VarHolder() {} + ~VarHolder(); void set(const T &v) { T old; @@ -35,4 +35,7 @@ public: } }; +template <typename T> +VarHolder<T>::~VarHolder() = default; + } |