Skip to content

Commit e4cb38c

Browse files
author
Mmanu Chaturvedi
committed
Fix cast
1 parent e4e3745 commit e4cb38c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/pybind11/cast.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,8 @@ detail::enable_if_t<
19701970

19711971
template <typename T>
19721972
detail::enable_if_t<
1973-
std::is_rvalue_reference<T&&>::value && !detail::is_pyobject<detail::intrinsic_t<T>>::value, object>
1973+
std::is_rvalue_reference<T&&>::value && !std::is_pointer<T>::value &&
1974+
!detail::is_pyobject<detail::intrinsic_t<T>>::value, object>
19741975
cast(T&& value) {
19751976
// Have to use `pybind11::move` because some compilers might try to bind `move` to `std::move`...
19761977
return pybind11::move<T>(std::move(value));

0 commit comments

Comments
 (0)