logoalt Hacker News

dataflowyesterday at 10:03 PM1 replyview on HN

Depends on where you're coming from, but some people would expect it to enforce that the pointer is non-null, then proceed. Which would actually give you a guaranteed crash in case it is null. But that's not what it does in C++, and I could see it not being entirely obvious.


Replies

IshKebabyesterday at 10:55 PM

Assert doesn't work like that in any language.

show 2 replies