Skip to content

Commit cd0533e

Browse files
drake: Remove redundant cast(T&&) overloads
They cause errors otherwise
1 parent 1ed85fd commit cd0533e

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

include/pybind11/cast.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2028,26 +2028,6 @@ object cast(T &&value, return_value_policy policy = return_value_policy::automat
20282028
template <typename T> T handle::cast() const { return pybind11::cast<T>(*this); }
20292029
template <> inline void handle::cast() const { return; }
20302030

2031-
template <typename T>
2032-
detail::enable_if_t<
2033-
// TODO(eric.cousineau): Figure out how to prevent perfect-forwarding more elegantly.
2034-
std::is_rvalue_reference<T&&>::value && !detail::is_pyobject<detail::intrinsic_t<T>>::value, object>
2035-
move(T&& value) {
2036-
// TODO(eric.cousineau): Add policies, parent, etc.
2037-
// It'd be nice to supply a parent, but for now, just leave it as-is.
2038-
handle no_parent;
2039-
return reinterpret_steal<object>(
2040-
detail::make_caster<T>::cast(std::move(value), return_value_policy::take_ownership, no_parent));
2041-
}
2042-
2043-
template <typename T>
2044-
detail::enable_if_t<
2045-
std::is_rvalue_reference<T&&>::value && !std::is_pointer<T>::value && !detail::is_pyobject<detail::intrinsic_t<T>>::value, object>
2046-
cast(T&& value) {
2047-
// Have to use `pybind11::move` because some compilers might try to bind `move` to `std::move`...
2048-
return pybind11::move<T>(std::move(value));
2049-
}
2050-
20512031
template <typename T>
20522032
detail::enable_if_t<!detail::move_never<T>::value, T> move(object &&obj) {
20532033
if (obj.ref_count() > 1)

0 commit comments

Comments
 (0)