From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:1a0c:b0:6cb:e0a3:f889 with SMTP id bk12-20020a05620a1a0c00b006cbe0a3f889mr15860872qkb.538.1663674269253; Tue, 20 Sep 2022 04:44:29 -0700 (PDT) X-Received: by 2002:ac8:7d54:0:b0:35c:e17a:4fbd with SMTP id h20-20020ac87d54000000b0035ce17a4fbdmr11081135qtb.309.1663674269079; Tue, 20 Sep 2022 04:44:29 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 20 Sep 2022 04:44:28 -0700 (PDT) In-Reply-To: <87k05znqpk.fsf@nightsong.com> Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.23; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 94.31.101.23 References: <5b429465-6166-4f33-ad1d-3103e4847efcn@googlegroups.com> <868rmfjnx4.fsf@stephe-leake.org> <87k05znqpk.fsf@nightsong.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0b04f763-fa89-4b34-ad52-eb9d57d80d8cn@googlegroups.com> Subject: Re: Move semantics From: AdaMagica Injection-Date: Tue, 20 Sep 2022 11:44:29 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:64370 List-Id: Paul Rubin schrieb am Montag, 19. September 2022 um 20:50:50 UTC+2: > I think it refers to the C++ notion. > https://en.cppreference.com/w/cpp/utility/move What I do not understand: Why should the move operation be less expensive than a copy? As I see it: First you have to do a copy, then delete the source. > but also means str might now be empty. I find this "may be empty" astonishing.