Lines Matching defs:holder
88 "holder, or value");
103 // deleter, or might be shared_from_this. So we construct a holder around it as if
104 // it was a normal instance, then steal the holder away into a local variable; thus
105 // the holder and destruction happens when we leave the C++ scope, and the holder
109 v_h.type->init_instance(v_h.inst, nullptr); // Set up the holder
110 Holder<Class> temp_holder(std::move(v_h.holder<Holder<Class>>())); // Steal the holder
111 v_h.type->dealloc(v_h); // Destroys the moved-out holder remains, resets value ptr to null
129 // Holder return: copy its pointer, and move or copy the returned holder into the new instance's
130 // holder. This also handles types like std::shared_ptr<T> and std::unique_ptr<T> where T is a
131 // derived type (through those holder's implicit conversion from derived class holder constructors).
133 void construct(value_and_holder &v_h, Holder<Class> holder, bool need_alias) {
134 auto *ptr = holder_helper<Holder<Class>>::get(holder);
137 throw type_error("pybind11::init(): construction failed: returned holder-wrapped instance "
141 v_h.type->init_instance(v_h.inst, &holder);