Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #15231
| From | woodbrian77@gmail.com |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Default move constructor/assignment |
| Date | 2012-04-05 09:35 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <24078035.279.1333643732405.JavaMail.geo-discussion-forums@ynes7> (permalink) |
| References | <4f7c129b$0$4386$7b1e8fa0@news.nbl.fi> <4f7d3aa0$0$3114$7b1e8fa0@news.nbl.fi> <28811616.820.1333614389405.JavaMail.geo-discussion-forums@yno37> <4f7d62ac$0$3066$7b1e8fa0@news.nbl.fi> |
On Thursday, April 5, 2012 4:15:24 AM UTC-5, Juha Nieminen wrote: > So it's not necessary to explicitly declare a move constructor or > assignment operator eg. for a struct having movable objects as members? Right. Here's the link to the cpp-next article I mentioned -- http://cpp-next.com/archive/2011/02/w00t-w00t-nix-nix/#more-3419 > > Now that I explicitly test this with clang++, it indeed seems to be so. > I'm not sure now why in the application I was making I was not getting > this behavior (iow. the move constructors of the members were not being > called, and instead the copy constructors were, unless I explicitly > declared the default move constructor of the containing class.) Perhaps adding a call to ::std::move would be needed? Post some code.
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-04 09:21 +0000
Re: Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-05 06:24 +0000
Re: Default move constructor/assignment Miles Bader <miles@gnu.org> - 2012-04-05 16:48 +0900
Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-05 01:26 -0700
Re: Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-05 09:15 +0000
Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-05 09:35 -0700
Re: Default move constructor/assignment Juha Nieminen <nospam@thanks.invalid> - 2012-04-06 05:29 +0000
Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-06 23:26 -0700
Re: Default move constructor/assignment Howard Hinnant <howard.hinnant@gmail.com> - 2012-04-07 10:34 -0700
Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-07 15:59 -0700
Re: Default move constructor/assignment woodbrian77@gmail.com - 2012-04-07 18:58 -0700
Re: Default move constructor/assignment SG <s.gesemann@gmail.com> - 2012-04-10 02:21 -0700
csiph-web