Archives:

c++ pass default shared_ptr reference as nullptr 5/5 (1)

First of all, shared_ptr can be a nullptr.  Nothing wrong passing a null shared pointer. In fact, a null shared pointer is an actual Null Object, which means that it’s designed exactly for those kinds of uses.   but if we want to pass the share_ptr as default nullptr reference, we need to put a const • Read More »