[gtkmm/dboles/issue94] treeiter—Delete TreeValueProxy copy-assign/warning




commit 775c8aaef04337cc7999ccb77dcaee934d2d9ea1
Author: Daniel Boles <dboles src gmail com>
Date:   Mon Apr 5 17:54:32 2021 +0100

    treeiter—Delete TreeValueProxy copy-assign/warning
    
    The user-provided, unimplemented operator=(TreeValueProxy const&)
    existed to prevent the class being copied, but since a long time C++
    provides a better way to do that: declaring the operator as deleted.
    
    Doing this also avoids warnings about the implicitly declared default
    copy constructor, which is deprecated due to the previously user-given
    operator=, and since the latter is now deleted the warnings are avoided.
    
    https://gitlab.gnome.org/GNOME/gtkmm/-/issues/94

 gtk/src/treeiter.hg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/src/treeiter.hg b/gtk/src/treeiter.hg
index e05dcddb..636d8461 100644
--- a/gtk/src/treeiter.hg
+++ b/gtk/src/treeiter.hg
@@ -232,7 +232,7 @@ private:
   const TreeModelColumn<ColumnType>&  column_;
 
   // no copy assignment
-  TreeValueProxy<ColumnType>& operator=(const TreeValueProxy<ColumnType>&);
+  TreeValueProxy<ColumnType>& operator=(const TreeValueProxy<ColumnType>&) = delete;
 };
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]