diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 2b9688e05..cb77cc818 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -2569,7 +2569,7 @@ template // Always a dict object object_api::annotations() const { dict annotations_dict = getattr(derived(), "__annotations__", dict()); - return annotations_dict; + return std::move(annotations_dict); } template