diff --git a/docs/advanced/functions.rst b/docs/advanced/functions.rst index ea9f35223..d37b8ecab 100644 --- a/docs/advanced/functions.rst +++ b/docs/advanced/functions.rst @@ -120,7 +120,7 @@ targeted arguments can be passed through the :class:`cpp_function` constructor: .. code-block:: cpp class_(m, "MyClass") - .def_property("data" + .def_property("data", py::cpp_function(&MyClass::getData, py::return_value_policy::copy), py::cpp_function(&MyClass::setData) );