Docs 6.9.4: Implicit Conversion to bool

Steven Schveighoffer schveiguy at gmail.com
Mon Mar 9 16:44:55 UTC 2020


On 3/9/20 11:35 AM, Manfred Nowak wrote:
> Having a function `f' overloaded for argument types `bool' and `ulong', 
> the specs guarantee, that for `f( 1uL)' the boolean overload of `f' is 
> called.
> 
> What is this good for?

You're not the first person to ask.

https://github.com/dlang/DIPs/blob/master/DIPs/rejected/DIP1015.md

-Steve


More information about the Digitalmars-d-learn mailing list