C++ Logo

std-discussion

Advanced search

Re: Deleting the Rvalue member function

From: Lénárd Szolnoki <cpp_at_[hidden]>
Date: Wed, 28 Dec 2022 12:13:55 +0000
On 28 December 2022 11:40:27 GMT, Frederick Virchanza Gotham via Std-Discussion <std-discussion_at_[hidden]> wrote:
>Lénárd wrote:
>
>>
>> Is there any relevance that you are using operator& here, instead of just
>> a regular member function?
>>
>>
>
>I chose one of the miranda members (i.e. one of the methods that's
>automatically provided by the compiler even if you don't define it
>yourself).
>
>Can you think of a regular member function that would make sense as an
>example here? I can't.

I don't think you get an automatic operator& that is accessible with the .operator&() syntax. `&u` and `&move(u)` is differrent.

Cheers,
Lénárd

Received on 2022-12-28 12:14:00