gives me the following error :
no suitable user-defined conversion from "std::shared_ptr" to "const std::weak_ptr"