Merge branch 'pybind:master' into master

This commit is contained in:
Steve R. Sun 2022-03-19 08:16:09 +08:00 committed by GitHub
commit ed8d11d3c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,7 @@ struct variant_caster<V<Ts...>> {
bool load_alternative(handle src, bool convert, type_list<U, Us...>) {
auto caster = make_caster<U>();
if (caster.load(src, convert)) {
value = cast_op<U>(caster);
value = cast_op<U>(std::move(caster));
return true;
}
return load_alternative(src, convert, type_list<Us...>{});