Move Constructors - Converting Lvalues to Rvalues

Manu turkeyman at gmail.com
Wed Oct 2 12:20:32 UTC 2024


On Tue, 1 Oct 2024, 03:31 Bastiaan Veelo via Digitalmars-d, <
digitalmars-d at puremagic.com> wrote:

> On Monday, 30 September 2024 at 16:05:16 UTC, Walter Bright wrote:
> [...]
> > P.S. C++ uses the std::move function to do it:
> >
> >
> https://learn.microsoft.com/en-us/cpp/standard-library/utility-functions?view=msvc-170#move
> >
> > which relies on rvalue references:
> >
> >
> https://learn.microsoft.com/en-us/cpp/cpp/rvalue-reference-declarator-amp-amp?view=msvc-170
> >
> > which is a major feature which I prefer to avoid.
>
> I suppose `-preview=rvaluerefparam` is not relevant here, right?
>

It's essential for this design to work; the logic in that preview allows
appropriate selection of copy/move overloads.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20241002/a26dc779/attachment.htm>


More information about the Digitalmars-d mailing list