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

Function load

include/pybind11/stl.h:188–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187public:
188 bool load(handle src, bool convert) {
189 if (!object_is_convertible_to_std_set(src, convert)) {
190 return false;
191 }
192 if (isinstance<anyset>(src)) {
193 value.clear();
194 return convert_anyset(reinterpret_borrow<anyset>(src), convert);
195 }
196 if (!convert) {
197 return false;
198 }
199 assert(isinstance<iterable>(src));
200 value.clear();
201 return convert_iterable(reinterpret_borrow<iterable>(src), convert);
202 }
203
204 template <typename T>
205 static handle cast(T &&src, return_value_policy policy, handle parent) {

Callers 1

loadMethod · 0.70

Calls 4

convert_anysetFunction · 0.85
convert_iterableFunction · 0.85
clearMethod · 0.45

Tested by

no test coverage detected