completed implicit type casters for reference_wrapper

This commit is contained in:
Wenzel Jakob
2016-04-21 12:21:14 +02:00
parent f54ded74f1
commit dbe43ffcce
5 changed files with 11 additions and 6 deletions

View File

@@ -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) \