@@ -1639,18 +1639,16 @@ struct move_only_holder_caster : type_caster_base<type> {
1639
1639
}
1640
1640
1641
1641
// Disable these?
1642
- explicit operator type*() { return this ->value ; }
1643
- explicit operator type&() { return *(this ->value ); }
1642
+ // explicit operator type*() { return this->value; }
1643
+ // explicit operator type&() { return *(this->value); }
1644
1644
1645
- explicit operator holder_type*() { return &holder; }
1645
+ // explicit operator holder_type*() { return &holder; }
1646
1646
1647
- // Workaround for Intel compiler bug
1648
- // see pybind11 issue 94
1649
- #if defined(__ICC) || defined(__INTEL_COMPILER)
1650
- operator holder_type&() { return holder; }
1651
- #else
1652
- explicit operator holder_type&() { return holder; }
1653
- #endif
1647
+ // Force rvalue.
1648
+ template <typename T>
1649
+ using cast_op_type = holder_type&&;
1650
+
1651
+ explicit operator holder_type&&() { return std::move (holder); }
1654
1652
1655
1653
object extract_from_container (handle src) {
1656
1654
// See if this is a supported `move` container.
@@ -2152,7 +2150,7 @@ class argument_loader {
2152
2150
2153
2151
template <typename Return, typename Func, size_t ... Is, typename Guard>
2154
2152
Return call_impl (Func &&f, index_sequence<Is...>, Guard &&) {
2155
- return std::forward<Func>(f)(std::forward<Args>( cast_op<Args>(std::move (std::get<Is>(argcasters) )))...);
2153
+ return std::forward<Func>(f)(cast_op<Args>(std::move (std::get<Is>(argcasters)))...);
2156
2154
}
2157
2155
2158
2156
std::tuple<make_caster<Args>...> argcasters;
0 commit comments