Drake
aliases

Variables

const auto py_reference_internal
 Shorthand alias to pybind for consistency. More...
 
const auto py_reference = py::return_value_policy::reference
 Used when returning references to objects that are internally owned by self. More...
 

Detailed Description

Variable Documentation

const auto py_reference = py::return_value_policy::reference

Used when returning references to objects that are internally owned by self.

Implies both py_reference and py::keep_alive<0, 1>, which implies "Keep alive, reference: `return` keeps` self` alive".

const auto py_reference_internal
Initial value:
=
py::return_value_policy::reference_internal

Shorthand alias to pybind for consistency.

Note
Downstream users should avoid using namespace drake::pydrake, as this may create ambiguous aliases (especially for GCC). Instead, consider an alias. Used when returning T& orconst T&`, as pybind's default behavior is to copy lvalue references.