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

Method execute

include/pybind11/detail/init.h:296–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294struct constructor {
295 template <typename Class, typename... Extra, enable_if_t<!Class::has_alias, int> = 0>
296 static void execute(Class &cl, const Extra &...extra) {
297 cl.def(
298 "__init__",
299 [](value_and_holder &v_h,
300 Args... args) { // NOLINT(performance-unnecessary-value-param)
301 v_h.value_ptr() = construct_or_initialize<Cpp<Class>>(std::forward<Args>(args)...);
302 },
303 is_new_style_constructor(),
304 extra...);
305 }
306
307 template <typename Class,
308 typename... Extra,

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected