I don't think opCmp can fit that model?

But aside from that, I think that's misleading, and suggests to the user
that it's a trivial operation.
Additionally, it's not necessarily even possible in a portable way.

I also think most users would expect that comparison operators produce a
boolean result.
They'll be surprised when: if(a > b) produces an error.


On 3 March 2013 23:39, bearophile <[email protected]> wrote:

> Manu:
>
>
>  If you want to do component-wise logic,
>> the typical approach is to use component-wise selection, eg:
>>   uint4 mask = compareGreater(a, b); // <- build a bit mask of 0's (false)
>>
>
> Isn't something like this better?
>
> uint4 mask = a > b;
>
> Bye,
> bearophile
>

Reply via email to