Replace boost shared_ptr, weak_ptr & dynamic_cast by std