Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #15237
| From | woodbrian77@gmail.com |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: Default move constructor/assignment |
| Date | 2012-04-06 23:26 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <19996601.695.1333779961722.JavaMail.geo-discussion-forums@yndg18> (permalink) |
| References | (1 earlier) <4f7d3aa0$0$3114$7b1e8fa0@news.nbl.fi> <28811616.820.1333614389405.JavaMail.geo-discussion-forums@yno37> <4f7d62ac$0$3066$7b1e8fa0@news.nbl.fi> <24078035.279.1333643732405.JavaMail.geo-discussion-forums@ynes7> <4f7e7f21$0$4360$7b1e8fa0@news.nbl.fi> |
On Friday, April 6, 2012 12:29:05 AM UTC-5, Juha Nieminen wrote: > I'm glad that move constructors are implicitly generated by the > compiler at least on simple cases because if they weren't, that would > *severely* limit the usefulness of having them in the first place. > > For example, you would benefit from move constructors when using eg. > a std::vector directly, but immediately when you put that std::vector > inside a simple struct, you would lose those benefits (unless you went > into the trouble of explicitly declaring the move constructor). > > I didn't really get what kind of code do these implicit move constructors > break, but I'm pretty certain that the benefits greatly outweight the > disadvantages. Yeah, I pretty much agree. http://www.velocityreviews.com/forums/t730954-class-invariants-and-implicit-move-constructors-c-0x.html
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