Equality operator chaining?
Shammah Chancellor
anonymous at coward.com
Sun Nov 10 18:45:24 PST 2013
On 2013-11-10 18:45:14 +0000, bearophile said:
> It avoids code like this, that needs an auxiliary variable:
>
> aux = foo(n);
> if (n == aux && aux == bar(n) && ...
>
>
> Is this idea going to cause troubles with operator overloading or
> something else? Do you like it? Is it important enough?
>
> Bye,
> bearophile
if( n == (foo(n) == bar(n))) is legal.
More information about the Digitalmars-d
mailing list