My most unpopular opinion: Modern C++17 is significantly less safe than C.
int *p=0; *p=42; // UB in 2nd statement. int &r=*(int *)0; r=42; // UB in 1st statement. Either way, result (UB) is same.
-
-
Sorry for sloppy language; neither 1st is a "statement"; both are declarations.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.