diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-27 01:37:13 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-27 01:37:13 +0100 |
commit | 495e2de57e587450e9532c7fe4ae0c2bfb196e6c (patch) | |
tree | 7b9b499cd258717901c6da9f9cea768d24262652 /src/core/common/Variant.hpp | |
parent | a453da28ddc856176747927a47d21af2bd4d4909 (diff) |
Marked move constructors noexcept (allows move constructor to be used when type is used within a stl container)
Diffstat (limited to 'src/core/common/Variant.hpp')
-rw-r--r-- | src/core/common/Variant.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/common/Variant.hpp b/src/core/common/Variant.hpp index fc4faf5..103c0e7 100644 --- a/src/core/common/Variant.hpp +++ b/src/core/common/Variant.hpp @@ -211,7 +211,7 @@ private: * * @param v is the Variant instance that should be copied to this instance. */ - void move(Variant &&v) + void move(Variant &&v) noexcept { destroy(); type = v.type; @@ -290,7 +290,7 @@ public: * @param v is the reference to the Variant instance that should be moved, * this instance is invalidated afterwards. */ - Variant(Variant &&v) : ptrVal(nullptr) { move(std::move(v)); } + Variant(Variant &&v) noexcept : ptrVal(nullptr) { move(std::move(v)); } /** * Default constructor. VariantType is set to VariantType:NULLPTR. @@ -413,7 +413,7 @@ public: /** * Move assignment operator. */ - Variant &operator=(Variant &&v) + Variant &operator=(Variant &&v) noexcept { move(std::move(v)); return *this; |