Lines Matching refs:def
114 m.def("move_and_copy_casts", [](py::object o) {
128 m.def("move_only", [](MoveOnlyInt m) { return m.value; });
129 m.def("move_or_copy", [](MoveOrCopyInt m) { return m.value; });
130 m.def("copy_only", [](CopyOnlyInt m) { return m.value; });
131 m.def("move_pair", [](std::pair<MoveOnlyInt, MoveOrCopyInt> p) {
134 m.def("move_tuple", [](std::tuple<MoveOnlyInt, MoveOrCopyInt, MoveOnlyInt> t) {
137 m.def("copy_tuple", [](std::tuple<CopyOnlyInt, CopyOnlyInt> t) {
140 m.def("move_copy_nested", [](std::pair<MoveOnlyInt, std::pair<std::tuple<MoveOrCopyInt, CopyOnlyInt, std::tuple<MoveOnlyInt>>, MoveOrCopyInt>> x) {
144 m.def("move_and_copy_cstats", []() {
162 m.def("move_optional", [](std::optional<MoveOnlyInt> o) {
165 m.def("move_or_copy_optional", [](std::optional<MoveOrCopyInt> o) {
168 m.def("copy_optional", [](std::optional<CopyOnlyInt> o) {
171 m.def("move_optional_tuple", [](std::optional<std::tuple<MoveOrCopyInt, MoveOnlyInt, CopyOnlyInt>> x) {
188 m.def("private_op_new_value", []() { return PrivateOpNew(); });
189 m.def("private_op_new_reference", []() -> const PrivateOpNew & {
202 py::class_<MoveIssue1>(m, "MoveIssue1").def(py::init<int>()).def_readwrite("value", &MoveIssue1::v);
209 py::class_<MoveIssue2>(m, "MoveIssue2").def(py::init<int>()).def_readwrite("value", &MoveIssue2::v);
211 m.def("get_moveissue1", [](int i) { return new MoveIssue1(i); }, py::return_value_policy::move);
212 m.def("get_moveissue2", [](int i) { return MoveIssue2(i); }, py::return_value_policy::move);