[libsigc++2] C++11: slot*: Add move operations.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigc++2] C++11: slot*: Add move operations.
- Date: Tue, 1 Sep 2015 12:33:50 +0000 (UTC)
commit 5c152260602e118e75761d9f8510e2368d7b3112
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Sep 1 14:33:22 2015 +0200
C++11: slot*: Add move operations.
sigc++/functors/macros/slot.h.m4 | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/sigc++/functors/macros/slot.h.m4 b/sigc++/functors/macros/slot.h.m4
index dac433c..27d19d2 100644
--- a/sigc++/functors/macros/slot.h.m4
+++ b/sigc++/functors/macros/slot.h.m4
@@ -86,14 +86,28 @@ FOR(1, $1,[
}
slot$1(const slot$1& src)
- : slot_base(src) {}
+ : slot_base(src)
+ {}
+
+ slot$1(slot$1&& src) noexcept
+ : slot_base(std::move(src))
+ {}
/** Overrides this slot making a copy from another slot.
* @param src The slot from which to make a copy.
* @return @p this.
*/
slot$1& operator=(const slot$1& src)
- { slot_base::operator=(src); return *this; }
+ {
+ slot_base::operator=(src);
+ return *this;
+ }
+
+ slot$1& operator=(slot$1&& src) noexcept
+ {
+ slot_base::operator=(std::move(src));
+ return *this;
+ }
};
])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]