mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 09:46:10 +00:00
completed implicit type casters for reference_wrapper
This commit is contained in:
@@ -246,6 +246,8 @@ public:
|
||||
static handle cast(const std::reference_wrapper<type> &src, return_value_policy policy, handle parent) {
|
||||
return type_caster<type>::cast(&src.get(), policy, parent);
|
||||
}
|
||||
template <typename T> using cast_op_type = std::reference_wrapper<type>;
|
||||
operator std::reference_wrapper<type>() { return std::ref(*((type *) this->value)); }
|
||||
};
|
||||
|
||||
#define PYBIND11_TYPE_CASTER(type, py_name) \
|
||||
|
||||
Reference in New Issue
Block a user