r/ProgrammerAnimemes • • Aug 11 '19

* null pointer = !%^*~

Post image
636 Upvotes

28 comments sorted by

View all comments

Show parent comment

1

u/BakuhatsuK Aug 12 '19

In C++ value types and references are never null (unless you are an special kind of asshole). In modern C++ you are only supposed to use pointers if you need the ability to put null in it or reseat it (if you only need to reseat it use gls::not_null<T*>), otherwise just use references.