Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weak_ptr: Make it possible to convert to "compatible" pointers
The patch introduces weak_ptr<T>(weak_ptr<Y>&&) constructor that creates weak_ptr<T> out of convertible to T* Y's. This has two implications. First, the main one, is that it's no possible to obtain a constant weak pointer on an object. Another, a nice side effect, is: given a base-class we can now create weak_ptr<base> out of weak_ptr<inherited>. Signed-off-by: Pavel Emelyanov <[email protected]>
- Loading branch information