logoalt Hacker News

AdieuToLogiclast Monday at 2:50 AM0 repliesview on HN

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.