Date: Thu, 11 May 2023 08:21:07 +0200
On Thu, May 04, 2023 at 10:54:21AM +0200, Sebastian Wittmeier via Std-Proposals wrote:
> Should be:
>
>
> auto operator^^(auto A, auto B)
>
> {
>
> if(A && !B)
>
> return A;
>
> if(B && !A)
>
> return B;
>
> return nil;
>
> }
>
That is a surprising formulation - not bad but surprising.
Consider operator ||, do you propose to change it to something along the
lines of
auto operator||(auto A, auto B)
{
if (A)
return A;
else
return B;
}
but with extra magic to short-circut?
/MF
> Should be:
>
>
> auto operator^^(auto A, auto B)
>
> {
>
> if(A && !B)
>
> return A;
>
> if(B && !A)
>
> return B;
>
> return nil;
>
> }
>
That is a surprising formulation - not bad but surprising.
Consider operator ||, do you propose to change it to something along the
lines of
auto operator||(auto A, auto B)
{
if (A)
return A;
else
return B;
}
but with extra magic to short-circut?
/MF
Received on 2023-05-11 06:21:11