Home
last modified time | relevance | path

Searched refs:RValueCaster (Results 1 – 3 of 3) sorted by relevance

/external/python/pybind11/tests/
Dtest_builtin_casters.cpp156 static std::pair<RValueCaster, RValueCaster> lvpair; in PYBIND11_NAMESPACE_END()
157 static std::tuple<RValueCaster, RValueCaster, RValueCaster> lvtuple; in PYBIND11_NAMESPACE_END()
158 …static std::pair<RValueCaster, std::tuple<RValueCaster, std::pair<RValueCaster, RValueCaster>>> lv… in PYBIND11_NAMESPACE_END()
159 m.def("rvalue_pair", []() { return std::make_pair(RValueCaster{}, RValueCaster{}); }); in PYBIND11_NAMESPACE_END()
161 …m.def("rvalue_tuple", []() { return std::make_tuple(RValueCaster{}, RValueCaster{}, RValueCaster{}… in PYBIND11_NAMESPACE_END()
164 …return std::make_pair(RValueCaster{}, std::make_tuple(RValueCaster{}, std::make_pair(RValueCaster{… in PYBIND11_NAMESPACE_END()
Dtest_stl.cpp74 static std::vector<RValueCaster> lvv{2}; in TEST_SUBMODULE()
104 m.def("cast_rv_vector", []() { return std::vector<RValueCaster>{2}; }); in TEST_SUBMODULE()
105 m.def("cast_rv_array", []() { return std::array<RValueCaster, 3>(); }); in TEST_SUBMODULE()
109 …cast_rv_map", []() { return std::unordered_map<std::string, RValueCaster>{{"a", RValueCaster{}}}; … in TEST_SUBMODULE()
111 std::vector<std::array<std::list<std::unordered_map<std::string, RValueCaster>>, 2>> v; in TEST_SUBMODULE()
114 v.back()[0].back().emplace("b", RValueCaster{}); in TEST_SUBMODULE()
115 v.back()[0].back().emplace("c", RValueCaster{}); in TEST_SUBMODULE()
117 v.back()[1].back().emplace("a", RValueCaster{}); in TEST_SUBMODULE()
120 static std::array<RValueCaster, 2> lva; in TEST_SUBMODULE()
121 …static std::unordered_map<std::string, RValueCaster> lvm{{"a", RValueCaster{}}, {"b", RValueCaster in TEST_SUBMODULE()
[all …]
Dpybind11_tests.h62 struct RValueCaster {}; struct
65 template<> class type_caster<RValueCaster> { in PYBIND11_NAMESPACE_BEGIN()
67 PYBIND11_TYPE_CASTER(RValueCaster, _("RValueCaster")); in PYBIND11_NAMESPACE_BEGIN()
68 …static handle cast(RValueCaster &&, return_value_policy, handle) { return py::str("rvalue").releas… in PYBIND11_NAMESPACE_BEGIN()
69 …static handle cast(const RValueCaster &, return_value_policy, handle) { return py::str("lvalue").r… in PYBIND11_NAMESPACE_BEGIN()