Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMHO, there are two review branches to discuss in this example:

First, if `ptr` is declared in the translation unit before and outside defining `class foo`, then there is no check for previous initialization and thus is likely a run-time defect.

Second, if `ptr` is not declared in the translation unit before and outside defining `class foo`, then it is likely a missing member definition and is a compile-time defect.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: