From 495e2de57e587450e9532c7fe4ae0c2bfb196e6c Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Tue, 27 Jan 2015 01:37:13 +0100 Subject: Marked move constructors noexcept (allows move constructor to be used when type is used within a stl container) --- src/core/common/Variant.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/common/Variant.hpp') 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; -- cgit v1.2.3