view all posts by Herb Sutter

Reader Q&A: Why dont modern smart pointers implicitly convert to *?

Herb Sutter Posted by Herb Sutter | Thu, 21 Jun 2012
see the original posting from Sutter's Mill
Today a reader asked a common question: Why doesn’t unique_ptr (and the ilk) appear to have an operator overload somewhat as follows: operator T*() { return get(); }; The reason I ask is because we have reams of old code wanting raw pointers (as function parms), and I would like to replace the outer layers [...]


see the original posting from Sutter's Mill

Back to top