summaryrefslogtreecommitdiff
path: root/tools/m4/class_boxedtype.m4
diff options
context:
space:
mode:
Diffstat (limited to 'tools/m4/class_boxedtype.m4')
-rw-r--r--tools/m4/class_boxedtype.m417
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/m4/class_boxedtype.m4 b/tools/m4/class_boxedtype.m4
index 1a9b731f..1afa53a5 100644
--- a/tools/m4/class_boxedtype.m4
+++ b/tools/m4/class_boxedtype.m4
@@ -135,6 +135,20 @@ __CPPNAME__::__CPPNAME__`'(const __CPPNAME__& other)
gobject_ ((other.gobject_) ? __BOXEDTYPE_FUNC_COPY`'(other.gobject_) : 0)
{}
+__CPPNAME__::__CPPNAME__`'(__CPPNAME__&& other)
+:
+ gobject_(other.gobject_)
+{
+ other.gobject_ = nullptr;
+}
+
+__CPPNAME__& __CPPNAME__::operator=(__CPPNAME__`'&& other)
+{
+ __CPPNAME__ temp (other);
+ swap(temp);
+ return *this;
+}
+
ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
__CPPNAME__::__CPPNAME__`'(__CNAME__* gobject, bool make_a_copy)
:
@@ -208,6 +222,9 @@ ifdef(`__BOOL_CUSTOM_CTOR_CAST__',,`dnl else
__CPPNAME__`'(const __CPPNAME__& other);
__CPPNAME__& operator=(const __CPPNAME__& other);
+ __CPPNAME__`'(__CPPNAME__&& other);
+ __CPPNAME__& operator=(__CPPNAME__&& other);
+
_IMPORT(SECTION_DTOR_DOCUMENTATION)
~__CPPNAME__`'();