NonNull template

Walter Bright newshound2 at digitalmars.com
Sat Apr 19 06:05:53 UTC 2025


On 4/18/2025 12:21 AM, Ogion wrote:
> Isn’t `ref` essentially a non-null pointer?

It's supposed to be. But you can write:
```d
int* p = null;
ref r = *p;
```
and you get a null ref.


More information about the Digitalmars-d mailing list