Date: Sat, 16 Jan 2021 23:24:45 +0100
On Sat, Jan 16, 2021 at 05:38:52PM +0100, Bengt Gustafsson via Std-Proposals wrote:
> Given that a language feature has more wiggle room we could define two
> different operators with limitations in applicability that can't be enforced
> for a library feature such as std::forward / std::move.
>
> prefix -> is a forwarding operator which can only be applied to universal
> references, i.e. parameters declared with deduced template type and a &&
> modifier.
>
> prefix => is a move operator which can only be applied to by value variables
> and rvalue references (excluding universal references!).
So, x <=> y means operator<(x, =>y), right?
/MF
> Given that a language feature has more wiggle room we could define two
> different operators with limitations in applicability that can't be enforced
> for a library feature such as std::forward / std::move.
>
> prefix -> is a forwarding operator which can only be applied to universal
> references, i.e. parameters declared with deduced template type and a &&
> modifier.
>
> prefix => is a move operator which can only be applied to by value variables
> and rvalue references (excluding universal references!).
So, x <=> y means operator<(x, =>y), right?
/MF
Received on 2021-01-16 16:24:57