fix for std::shared_ptr proposed by Vayu (fixes #8)

This commit is contained in:
Wenzel Jakob 2015-11-12 23:27:20 +01:00
parent 54289302bc
commit 723bc65b27

View File

@ -527,6 +527,12 @@ public:
explicit operator type&() { return *(this->value); }
explicit operator holder_type&() { return holder; }
explicit operator holder_type*() { return &holder; }
using type_caster<type>::cast;
static PyObject *cast(const holder_type &src, return_value_policy policy, PyObject *parent) {
return type_caster<type>::cast(src.get(), policy, parent);
}
protected:
holder_type holder;
};