References in D

Jacob Carlborg doob at me.com
Sun Sep 16 04:33:38 PDT 2012


On 2012-09-15 23:30, Walter Bright wrote:

> Doing null references in C++ is simple:
>
> int *p = NULL;
> int& r = *p;
>
> r = 3; // crash

Won't that crash at the first assignment of "r", since you dereferencing 
a null pointer?.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list