creating a shared_ptr<T> from a weak_ptr<T>