Lines Matching defs:cast
75 bool load(handle src, bool) { value = MoveOnlyInt(src.cast<int>()); return true; }
76 static handle cast(const MoveOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(m.value, r, p); }
81 bool load(handle src, bool) { value = MoveOrCopyInt(src.cast<int>()); return true; }
82 static handle cast(const MoveOrCopyInt &m, return_value_policy r, handle p) { return pybind11::cast(m.value, r, p); }
90 bool load(handle src, bool) { value = CopyOnlyInt(src.cast<int>()); return true; }
91 static handle cast(const CopyOnlyInt &m, return_value_policy r, handle p) { return pybind11::cast(m.value, r, p); }
92 static handle cast(const CopyOnlyInt *src, return_value_policy policy, handle parent) {
94 return cast(*src, policy, parent);
116 r += py::cast<MoveOrCopyInt>(o).value; /* moves */
117 r += py::cast<MoveOnlyInt>(o).value; /* moves */
118 r += py::cast<CopyOnlyInt>(o).value; /* copies */
119 MoveOrCopyInt m1(py::cast<MoveOrCopyInt>(o)); /* moves */
120 MoveOnlyInt m2(py::cast<MoveOnlyInt>(o)); /* moves */
121 CopyOnlyInt m3(py::cast<CopyOnlyInt>(o)); /* copies */
154 d["MoveOrCopyInt"] = py::cast(mc, py::return_value_policy::reference);
155 d["MoveOnlyInt"] = py::cast(mo, py::return_value_policy::reference);
156 d["CopyOnlyInt"] = py::cast(co, py::return_value_policy::reference);