docs/definition: !object

ketmar ketmar at ketmar.no-ip.org
Thu Mar 8 05:05:53 UTC 2018


Nick Sabalausky (Abscissa) wrote:

> I'm having trouble finding the documentation for what exactly the unary 
> "not" operator does when applied to a class/interface object. Does this 
> documentation exist somewhere?
>
> I know at least part of it involves "is null", but I seem to remember 
> hearing there was more to it than just that.

https://dlang.org/spec/operatoroverloading.html#boolean_operators

"Class references are converted to bool by checking to see if the class reference is null or not."


More information about the Digitalmars-d-learn mailing list