Skip to content

Latest commit

 

History

History
5 lines (3 loc) · 319 Bytes

2.23.md

File metadata and controls

5 lines (3 loc) · 319 Bytes

No, you can't. Because it would be expensive to maintain meta data about what constitutes a valid pointer and what doesn't, and in C++ you don't pay for what you don't want.

See answer here.

However, a smart pointer can be used to tell if it points to a valid object.