Neither of these functions alter the ownership of the provided pointer, so we can simply make the parameters a reference rather than a direct shared pointer alias. This way we also disallow passing incorrect memory values like nullptr.
Neither of these functions alter the ownership of the provided pointer, so we can simply make the parameters a reference rather than a direct shared pointer alias. This way we also disallow passing incorrect memory values like nullptr.