On Wed, 15 Oct 2025, Alejandro Colomar wrote: > Hi Michael, > > On Wed, Oct 15, 2025 at 02:47:46PM +0200, Michael Matz wrote: > > Hello, > > > > On Tue, 14 Oct 2025, Alejandro Colomar wrote: > > > > > Because bool is entirely different from the other regular integer types, > > > and has entirely different rules, > > > > Why do you say that? bool and its operations is a normal finite algebra > > on an ordered set, the only thing being that its add/mul are saturating > > and have "funny" colloquial names (namely "or" and "and"): > > > > add == or ; mul == and > > Saturating arithmetics are what make it different, IMO.
I'd say the arithmetic operations aren't even relevant here; for _Maxof and _Minof to be meaningful, the semantics of conversion to bool don't matter, just the set of values representable in the type. As an integer type, it's natural with orthogonal language design to define _Maxof and _Minof to apply to it. -- Joseph S. Myers [email protected]
