Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| X-Received | by 10.58.67.193 with SMTP id p1mr6984565vet.36.1402126802198; Sat, 07 Jun 2014 00:40:02 -0700 (PDT) |
|---|---|
| MIME-Version | 1.0 |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!hw13no5127203qab.0!news-out.google.com!s2ni4424qap.0!nntp.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!news.giganews.com.POSTED!not-for-mail |
| NNTP-Posting-Date | Sat, 07 Jun 2014 02:40:01 -0500 |
| Return-Path | <cppmods@glengoyne.dreamhost.com> |
| Sender | std-cpp-request@vandevoorde.com |
| Approved | james.dennett@gmail.com |
| Message-ID | <e57b95aa-61dd-4669-aad5-08354bdec680@googlegroups.com> (permalink) |
| Newsgroups | comp.std.c++ |
| From | Piotr Nycz <piotrwn1@googlemail.com> |
| Subject | Re: Is removing necessity of std::move for local variables used for the last time a good proposal? |
| Organization | unknown |
| References | <874c0712-4aed-4a8f-991e-b064daa5000f@googlegroups.com> <263da605-5281-469e-86b4-6209739c6133@googlegroups.com> |
| X-Original-Date | Fri, 6 Jun 2014 01:17:19 -0700 (PDT) |
| X-Submission-Address | std-cpp-submit@vandevoorde.com |
| To | undisclosed-recipients:; |
| Date | Sat, 7 Jun 2014 02:33:54 CST |
| Lines | 68 |
| X-Usenet-Provider | http://www.giganews.com |
| X-Trace | sv3-ocFCRFDFcO72GJCRszj7RSzkXOx09UAzmiMninL2BFFLtK/P/oxW+iRP1fAWtYoeVJQOnD+pSg9hhMe!QU6yaT4p8qEBL+bhd6NIZM6YmeyG3ma4kgfvOBz++3NYkk+OZpsMbyQnDn2iIJMNxqtUkPYQJiRU!K7U1bfUTk0c= |
| X-Complaints-To | abuse@giganews.com |
| X-DMCA-Notifications | http://www.giganews.com/info/dmca.html |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 3341 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Xref | csiph.com comp.std.c++:722 |
Show key headers only | View raw
> > [...] > > > So, do you think is it a good idea to add a rule to C++ language that: > > > > > > If the automatic variable is used as a source for copying and this is > > > the last time variable is used - then move is used instead of copy. > > > > > > If the above rule would be added to language - then to my best > > > understanding - there would be no need to use std::move in my example. > > > [...] > > > > So far, as you probably know, a compiler is not required nor allowed > > to do that. I think there is some value in further analyzing the > > impact of such a rule. We would not want this rule to break something. > > I've trouble coming up with examples that would break, but it does > > not mean that there are none. It would be nice to have a somewhat > > formal proof under reasonable assumptions that nothing could go wrong. > > > Hello, sg - thanks for quick response. Well, I just followed this guidance: "The public can submit proposed defect reports via the Internet news group comp.std.c++ " from C++ standard webpage (http://www.open-std.org/jtc1/sc22/wg21/docs/standards#14882). And I have no idea how to find a "formal proof [...] that nothing could go wrong". I hope this is everything from my side to raise this issue to C++ standard folks - but if I am wrong - please tell me. And a general comment: C++11 is great, many things can be written in more readable, more compact and, what I appreciate a most, shorter way. But this one feature, with this "annoying" std::move() needed almost everywhere - is one thing that really s... BR, Piotr -- [ comp.std.c++ is moderated. To submit articles, try posting with your ] [ newsreader. If that fails, use mailto:std-cpp-submit@vandevoorde.com ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Back to comp.std.c++ | Previous | Next — Previous in thread | Next in thread | Find similar
Is removing necessity of std::move for local variables used for the last time a good proposal? Piotr Nycz <piotrwn1@googlemail.com> - 2014-05-30 15:32 -0600
Re: Is removing necessity of std::move for local variables used for the last time a good proposal? SG <s.gesemann@googlemail.com> - 2014-06-05 12:31 -0600
Re: Is removing necessity of std::move for local variables used for the last time a good proposal? Kalle Olavi Niemitalo <kon@iki.fi> - 2014-06-07 01:25 -0600
Re: Is removing necessity of std::move for local variables used for the last time a good proposal? Piotr Nycz <piotrwn1@googlemail.com> - 2014-06-07 02:33 -0600
Re: Is removing necessity of std::move for local variables used for the last time a good proposal? Daniel Krügler <daniel.kruegler@googlemail.com> - 2014-06-08 01:32 -0600
Re: Is removing necessity of std::move for local variables used for the last time a good proposal? Piotr Nycz <piotrwn1@googlemail.com> - 2014-06-17 07:25 -0600
csiph-web