On Wed, 21 Jan 2015 08:39:46 +0100 Murray Cumming <murr...@murrayc.com> wrote: > On Sun, 2014-12-28 at 15:42 +0100, Christof Meerwald wrote: > > Hi, > > > > just wondering if anyone has given any thought on C++11 features for > > gtkmm. > > > > One thing that seems very unfortunate is that all objects are > > non-movable (due to them being explicitly made non-copyable which > > then also deletes the move constructor). > [snip] > > I believe it's possible to make classes movable but not copyable. That > feels strange to me, but maybe that's just because I'm not using C++11 > day to day. I hope that this wouldn't lead to code that looked too > much like the widgets were being copied. I can imagine a lot of > confusion from less experienced coders.
It is possible (the canonical example is of course std::unique_ptr) and it does not confuse, because lvalues can only be moved by converting them to rvalues, in other words by calling std::move on them. Calling std::move makes it clear, I think, that no copying is involved. Chris _______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtkmm-list