Warn when shared_object_ptr misused