Lines Matching defs:const

23     ExampleMandA(const ExampleMandA &e) : value(e.value) { print_copy_created(this); }
31 void operator=(const ExampleMandA &e) { print_copy_assigned(this); value = e.value; }
36 void add3(const ExampleMandA &other) { value += other.value; } // passing by const reference
38 void add5(const ExampleMandA *other) { value += other->value; } // passing by const pointer
42 void add8(const int &other) { value += other; } // passing by const reference
44 void add10(const int *other) { value += *other; } // passing by const pointer
48 const ExampleMandA &self3() { return *this; } // return by const reference
50 const ExampleMandA *self5() { return this; } // return by const pointer
54 const int &internal3() { return value; } // return by const reference
56 const int *internal5() { return &value; } // return by const pointer
64 py::str overloaded(int) const { return "(int) const"; }
65 py::str overloaded(int, float) const { return "(int, float) const"; }
66 py::str overloaded(float, int) const { return "(float, int) const"; }
67 py::str overloaded(int, int) const { return "(int, int) const"; }
68 py::str overloaded(float, float) const { return "(float, float) const"; }
79 int get() const { return value; }
99 const UserType &get1() const { return v1; }
100 const UserType &get2() const { return v2; }
101 UserType get_rvalue() const { return v2; }
124 static handle cast(const ArgInspector1 &src, return_value_policy, handle) {
139 static handle cast(const ArgInspector2 &src, return_value_policy, handle) {
151 static handle cast(const ArgAlwaysConverts &, return_value_policy, handle) {
162 DestructionTester(const DestructionTester &) { print_copy_created(this); }
164 DestructionTester &operator=(const DestructionTester &) { print_copy_assigned(this); return *this; }
172 static handle cast(const DestructionTester &, return_value_policy, handle) {
180 int none1(const NoneTester &obj) { return obj.answer; }
196 void do_nothing() const {}
199 int get_int() const { return rw_value; }
200 double get_double() const { return ro_value; }
207 double sum() const { return rw_value + ro_value; }
215 .def(py::init<const ExampleMandA&>())
260 .def("overloaded_const", static_cast<py::str (ExampleMandA::*)(float, int) const>(&ExampleMandA::overloaded))
261 .def("overloaded_const", static_cast<py::str (ExampleMandA::*)(int, int) const>(&ExampleMandA::overloaded))
262 .def("overloaded_const", static_cast<py::str (ExampleMandA::*)(float, float) const>(&ExampleMandA::overloaded))
314 auto static_get1 = [](py::object) -> const UserType & { return TestPropRVP::sv1; };
315 auto static_get2 = [](py::object) -> const UserType & { return TestPropRVP::sv2; };
367 std::string g(ArgInspector1 a, const ArgInspector1 &b, int c, ArgInspector2 *d, ArgAlwaysConverts) {
421 .def("__str__", [](const StrIssue &si) {
447 static_assert(std::is_same<Adapted, void (RegisteredDerived::*)() const>::value, "");
457 m.def("custom_caster_destroy_const", []() -> const DestructionTester * { return new DestructionTester(); },
458 py::return_value_policy::take_ownership); // Likewise (const doesn't inhibit destruction)