cast.h.patch 802 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
diff --git a/include/pybind11/cast.h b/include/pybind11/cast.h
index 3a404602..9054478c 100644
--- a/include/pybind11/cast.h
+++ b/include/pybind11/cast.h
@@ -42,7 +42,9 @@ using make_caster = type_caster<intrinsic_t<type>>;
 // Shortcut for calling a caster's `cast_op_type` cast operator for casting a type_caster to a T
 template <typename T>
 typename make_caster<T>::template cast_op_type<T> cast_op(make_caster<T> &caster) {
-    return caster.operator typename make_caster<T>::template cast_op_type<T>();
+    // https://github.com/pybind/pybind11/issues/4606 with CUDA 12
+    //return caster.operator typename make_caster<T>::template cast_op_type<T>();
+    return caster;
 }
 template <typename T>
 typename make_caster<T>::template cast_op_type<typename std::add_rvalue_reference<T>::type>