A Default Value to Dereference Null Pointers
▻https://www.fluentcpp.com/2021/05/14/a-default-value-to-dereference-null-pointers
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 […]