A Default Value to Dereference Null Pointers--Jonathan Boccara

Adding more readability.

A Default Value to Dereference Null Pointers

by Jonathan Boccara

From the article:

With C++17, modern C++ has acquired a nullable object: std::optional. optional has a pretty rich interface, in particular when it comes to handling null optionals.

On the other hand, the oldest nullable type in C++, pointers, doesn’t have any helper to make the handling of its nullity more expressive.

Let’s see what we can do about it, to make our code using pointers, smart or raw, easier to read...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.