MCPcopy Create free account
hub / github.com/pybind/pybind11 / load

Method load

include/pybind11/stl.h:544–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

542 }
543
544 bool load(handle src, bool convert) {
545 if (!src) {
546 return false;
547 }
548 if (src.is_none()) {
549 return true; // default-constructed value is already empty
550 }
551 value_conv inner_caster;
552 if (!inner_caster.load(src, convert)) {
553 return false;
554 }
555
556 value.emplace(cast_op<Value &&>(std::move(inner_caster)));
557 return true;
558 }
559
560 PYBIND11_TYPE_CASTER(Type, value_conv::name | make_caster<none>::name);
561};

Callers

nothing calls this directly

Calls 2

moveFunction · 0.85
loadMethod · 0.45

Tested by

no test coverage detected