Move the implementation of make_intrusive_ptr as a static factor method of the intrusive_ptr class.
This makes it easy to declare intrusive_ptr as a friend method (if needed) of a class whose constructor is private. Otherwise, we will have to add the global template function as a friend which is not quite pleasant.
Move the implementation of make_intrusive_ptr as a static factor method of the intrusive_ptr class.
This makes it easy to declare intrusive_ptr as a friend method (if needed) of a class whose constructor is private. Otherwise, we will have to add the global template function as a friend which is not quite pleasant.