Re: Implementing swap()

2015-10-12 Thread Matteo Settenvini
Matteo Settenvini writes: > Murray Cumming writes: > >> And, should we implement swap() using std::swap() on the member >> variables, or even std::move() on the member variables? > > It depends. If everything is noexcept, I'd say it's quite the same.

Re: Implementing swap()

2015-09-11 Thread Kjell Ahlstedt
Den 2015-09-11 kl. 00:11, skrev Jonas Platte: Am 10.09.2015 um 23:11 schrieb Murray Cumming: Now that our Glib::Objects and Gtk::Widgets are movable, so they can be placed in standard containers, I guess we should implement swap() so the standard containers can use that too. And maybe it's

Re: Implementing swap()

2015-09-11 Thread Murray Cumming
On Fri, 2015-09-11 at 00:11 +0200, Jonas Platte wrote: > With gobject_ being a std::unique_ptr in this case, [snip] This would be an ABI break so we have to rule it out at least for now. -- Murray Cumming murr...@murrayc.com www.murrayc.com ___

Re: Implementing swap()

2015-09-10 Thread Jonas Platte
Am 10.09.2015 um 23:11 schrieb Murray Cumming: > Now that our Glib::Objects and Gtk::Widgets are movable, so they can be > placed in standard containers, I guess we should implement swap() so the > standard containers can use that too. And maybe it's just generally good > practice to provide a

Implementing swap()

2015-09-10 Thread Murray Cumming
Now that our Glib::Objects and Gtk::Widgets are movable, so they can be placed in standard containers, I guess we should implement swap() so the standard containers can use that too. And maybe it's just generally good practice to provide a swap() for all classes. Stop me at this point if I'm wrong