Re: C++11 features, move semantics?



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.

A patch (in bugzilla) would probably be the best way to show us how this
would be useful.

I've just updated (rebased) my c++11 branch for glibmm and put it in the
c++11v2 branch. So far it's mostly changes to examples to show how
gtkmm-based code might look nicer:
https://git.gnome.org/browse/glibmm/log/?h=c%2b%2b11v2


-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com




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