Skip to content

Commit

Permalink
argument_loader doesn't consider actual argument types
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Dec 30, 2019
1 parent 16bb183 commit b78e8e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/pybind11/cast.h
Original file line number Diff line number Diff line change
Expand Up @@ -1995,6 +1995,8 @@ class argument_loader {

template <size_t... Is>
bool load_impl_sequence(function_call &call, index_sequence<Is...>) {
// BUG: When loading the arguments, the actual argument type (pointer, lvalue reference, rvalue reference)
// is already lost (argcasters only know the intrinsic type), while the behaviour should differ for them, e.g. for rvalue references.
for (bool r : {std::get<Is>(argcasters).load(call.args[Is], call.args_convert[Is])...})
if (!r)
return false;
Expand Down

0 comments on commit b78e8e3

Please sign in to comment.