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/managed/Managed.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/managed/Managed.hpp')
-rw-r--r-- | src/core/managed/Managed.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/managed/Managed.hpp b/src/core/managed/Managed.hpp index cb7104b..7c43527 100644 --- a/src/core/managed/Managed.hpp +++ b/src/core/managed/Managed.hpp @@ -453,7 +453,7 @@ public: * * @param h is the Rooted to be moved to this instance. */ - Rooted(Rooted<T> &&h) : Handle<T>(h.ptr) { h.ptr = nullptr; } + Rooted(Rooted<T> &&h) noexcept : Handle<T>(h.ptr) { h.ptr = nullptr; } /** * Constructor of the Rooted class. @@ -494,7 +494,7 @@ public: * * @param h is the Owned to be moved to this instance. */ - Rooted<T> &operator=(Rooted<T> &&h) + Rooted<T> &operator=(Rooted<T> &&h) noexcept { deleteRef(); this->ptr = h.ptr; @@ -523,7 +523,7 @@ public: * * @param h is the Owned to be moved to this instance. */ - Rooted<T> &operator=(Handle<T> &&h) + Rooted<T> &operator=(Handle<T> &&h) noexcept { deleteRef(); this->ptr = h.ptr; @@ -600,7 +600,7 @@ public: * * @param h is the Owned to be moved to this instance. */ - Owned(Owned<T> &&h) : Handle<T>(h.get()), owner(h.getOwner()) + Owned(Owned<T> &&h) noexcept : Handle<T>(h.get()), owner(h.getOwner()) { h.ptr = nullptr; } @@ -627,7 +627,7 @@ public: * * @param h is the Owned to be moved to this instance. */ - Owned<T> &operator=(Owned<T> &&h) + Owned<T> &operator=(Owned<T> &&h) noexcept { deleteRef(); this->ptr = h.ptr; |