C++ Logo


Advanced search

Re: Deleting the Rvalue member function

From: Frederick Virchanza Gotham <cauldwell.thomas_at_[hidden]>
Date: Fri, 30 Dec 2022 13:28:48 +0000
On Friday, December 30, 2022, Lénárd Szolnoki via Std-Discussion <
std-discussion_at_[hidden]> wrote:
> >Do you reckon it should be a compiler error to delete the unary '&'
> >operator for Rvalues? Should I post to the proposals group to make it a
> >compiler error in C++26?
> What would be the reasoning? I mean not many operator& overloads make
> sense, including a deleted rvalue one, but I don't see a reason to
> needlessly introduce a corner case to the language.

Does it make sense to be able to 'delete' something that isn't
automatically provided? You can't apply & to an Rvalue anyway.

Received on 2022-12-30 13:28:50