Commit 6a09c460 authored by Martin Heistermann's avatar Martin Heistermann

explicitly define property move semantics.

parent 815c23ae
Pipeline #11945 passed with stage
in 4 minutes and 54 seconds
......@@ -91,6 +91,13 @@ public:
PropertyTT(MeshT *mesh, const std::string& _name, const T &_def = T())
: PropertyTT(std::move(mesh->template request_property<T, Entity>(_name, _def)))
PropertyTT (const PropertyTT<T, Entity>&) = default;
PropertyTT (PropertyTT<T,Entity>&&) = default;
// copy assignment can be confusing for users - instead of the property contents
// being assigned, the PropertyPtr just points to the rhs now.
PropertyTT<T, Entity>& operator=(const PropertyTT<T, Entity>&) = delete;
PropertyTT<T, Entity>& operator=(PropertyTT<T, Entity>&&) = default;
using PropertyHandleT = OpenVolumeMesh::PropHandleT<Entity>;
PropertyTT(const std::string& _name, const std::string& _internal_type_name, ResourceManager& _resMan, PropertyHandleT _handle, const T &_def = T());
~PropertyTT() override = default;
......@@ -77,6 +77,11 @@ public:
/// Destructor
~PropertyPtr() override;
PropertyPtr(const PropertyPtr<PropT, Entity>&) = default;
PropertyPtr(PropertyPtr<PropT, Entity>&&) = default;
PropertyPtr<PropT, Entity>& operator=(const PropertyPtr<PropT, Entity>&) = default;
PropertyPtr<PropT, Entity>& operator=(PropertyPtr<PropT, Entity>&&) = default;
using ptr::shared_ptr<PropT>::operator*;
using ptr::shared_ptr<PropT>::operator->;
using ptr::shared_ptr<PropT>::operator bool;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment