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=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: Move semantics Date: Tue, 20 Sep 2022 12:39:44 -0700 Organization: A noiseless patient Spider Message-ID: <87fsglomwv.fsf@nightsong.com> References: <5b429465-6166-4f33-ad1d-3103e4847efcn@googlegroups.com> <868rmfjnx4.fsf@stephe-leake.org> <87k05znqpk.fsf@nightsong.com> <0b04f763-fa89-4b34-ad52-eb9d57d80d8cn@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="426fc8602af2e2372f9d82205b2e6e6e"; logging-data="1675196"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Yeeq45ITlbLb5UdkfD/tN" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:Y5yPGSLDxxr8Xum7aR3mEsqRpao= sha1:JFMlnBPx+ux6xyesRoBaUoCvzQU= Xref: reader01.eternal-september.org comp.lang.ada:64372 List-Id: AdaMagica writes: > What I do not understand: Why should the move operation be less > expensive than a copy? Besides avoiding copying indirectly pointed-to data, it also can enforce single ownership in things like std::unique_ptr.