Added PropertyManager::move to C++11 branch.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1096 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Hans-Christian Ebke
2014-06-26 11:38:13 +00:00
parent 93fa136072
commit 10bcfd50ff

View File

@@ -184,6 +184,13 @@ class PropertyManager {
return std::move(pm); return std::move(pm);
} }
/**
* Included for backwards compatibility with non-C++11 version.
*/
PropertyManager move() {
return std::move(*this);
}
#else #else
class Proxy { class Proxy {
private: private:
@@ -204,6 +211,10 @@ class PropertyManager {
return p; return p;
} }
Proxy move() {
return (Proxy)*this;
}
PropertyManager(Proxy p) : mesh_(p.mesh_), prop_(p.prop_), retain_(p.retain_), name_(p.name_) {} PropertyManager(Proxy p) : mesh_(p.mesh_), prop_(p.prop_), retain_(p.retain_), name_(p.name_) {}
PropertyManager &operator=(Proxy p) { PropertyManager &operator=(Proxy p) {