From 10bcfd50ff0f4e19e7dc11f488ea66d0943cfc29 Mon Sep 17 00:00:00 2001 From: Hans-Christian Ebke Date: Thu, 26 Jun 2014 11:38:13 +0000 Subject: [PATCH] Added PropertyManager::move to C++11 branch. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1096 fdac6126-5c0c-442c-9429-916003d36597 --- src/OpenMesh/Core/Utils/PropertyManager.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh index b8d68408..b00d6c54 100644 --- a/src/OpenMesh/Core/Utils/PropertyManager.hh +++ b/src/OpenMesh/Core/Utils/PropertyManager.hh @@ -184,6 +184,13 @@ class PropertyManager { return std::move(pm); } + /** + * Included for backwards compatibility with non-C++11 version. + */ + PropertyManager move() { + return std::move(*this); + } + #else class Proxy { private: @@ -204,6 +211,10 @@ class PropertyManager { return p; } + Proxy move() { + return (Proxy)*this; + } + PropertyManager(Proxy p) : mesh_(p.mesh_), prop_(p.prop_), retain_(p.retain_), name_(p.name_) {} PropertyManager &operator=(Proxy p) {