by saagarjha · 8y ago · 0 comments
Deref'ing an empty (e.g. moved-from) unique_ptr is still UB.
(That'll only work for null.)
No. Even with smart pointers it's possible (move out of unique_ptr, deref). But even with no pointers it's possible - index into an array without checking the bound, signed int overflow, etc.