| 1881 | // that only does anything in cases where pybind11::cast is valid. |
| 1882 | template <typename T> |
| 1883 | enable_if_t<cast_is_temporary_value_reference<T>::value |
| 1884 | && !detail::is_same_ignoring_cvref<T, PyObject *>::value, |
| 1885 | T> |
| 1886 | cast_safe(object &&) { |
| 1887 | pybind11_fail("Internal error: cast_safe fallback invoked"); |
| 1888 | } |
| 1889 | template <typename T> |
| 1890 | enable_if_t<std::is_void<T>::value, void> cast_safe(object &&) {} |
| 1891 | template <typename T> |