C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Relocation in C++

From: Ville Voutilainen <ville.voutilainen_at_[hidden]>
Date: Wed, 2 Mar 2022 13:45:25 +0200
On Wed, 2 Mar 2022 at 13:42, F.v.S. via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
> I think this problem is almost unrelated to relocation. std::move is arguably misnamed, as it doesn't perfom but only possibly triggers move operations. as_rvalue/as_xvalue may be a less misleading name.

Well, even though we apparently plan to name a view views::as_rvalue,
that doesn't make it a better name. as_rvalue is perhaps not
misleading,
because it's not leading anyone to anything, other than experts. I
find f(std::move(x)) infinitely more readable and easy to understand
compared to a hypothetical f(std::as_rvalue(x)).

Received on 2022-03-02 11:45:37