Home
last modified time | relevance | path

Searched refs:IncType (Results 1 – 4 of 4) sorted by relevance

/external/python/pybind11/tests/
Dpybind11_tests.h44 class IncType : public UserType {
47 IncType() = default;
48 IncType(const IncType &other) : IncType(other.value() + 1) { } in IncType() function
49 IncType(IncType &&) = delete;
50 IncType &operator=(const IncType &) = delete;
51 IncType &operator=(IncType &&) = delete;
Dpybind11_tests.cpp84 py::class_<IncType, UserType>(m, "IncType") in PYBIND11_MODULE()
87 .def("__repr__", [](const IncType& u) { return "IncType({})"_s.format(u.value()); }); in PYBIND11_MODULE()
Dtest_builtin_casters.cpp224 static IncType x1(1), x2(2); in PYBIND11_NAMESPACE_END()
233 m.def("refwrap_iiw", [](const IncType &w) { return w.value(); }); in PYBIND11_NAMESPACE_END()
234 m.def("refwrap_call_iiw", [](IncType &w, py::function f) { in PYBIND11_NAMESPACE_END()
238 IncType x(w.value()); in PYBIND11_NAMESPACE_END()
240 IncType y(w.value()); in PYBIND11_NAMESPACE_END()
Dtest_builtin_casters.py7 from pybind11_tests import UserType, IncType
425 assert m.refwrap_iiw(IncType(5)) == 5
426 assert m.refwrap_call_iiw(IncType(10), m.refwrap_iiw) == [10, 10, 10, 10]