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

Method write

include/pybind11/pybind11.h:2134–2141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2132
2133 template <typename PM, must_be_member_function_pointer<PM> = 0>
2134 static cpp_function write(PM pm, const handle &hdl) {
2135 type_info *tinfo = get_type_info(typeid(T), /*throw_if_missing=*/true);
2136 if (tinfo->holder_enum_v == holder_enum_t::smart_holder) {
2137 return cpp_function([pm](T &c, D value) { c.*pm = std::forward<D>(std::move(value)); },
2138 is_method(hdl));
2139 }
2140 return property_cpp_function_classic<T, D>::write(pm, hdl);
2141 }
2142};
2143
2144// Specialization for members held by-value, using smart_holder if that is the class_ holder,

Callers

nothing calls this directly

Calls 3

cpp_functionClass · 0.85
moveFunction · 0.85
is_methodClass · 0.85

Tested by

no test coverage detected