Commit 723bc65b by Wenzel Jakob

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

parent 54289302
...@@ -527,6 +527,12 @@ public: ...@@ -527,6 +527,12 @@ public:
explicit operator type&() { return *(this->value); } explicit operator type&() { return *(this->value); }
explicit operator holder_type&() { return holder; } explicit operator holder_type&() { return holder; }
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: protected:
holder_type holder; holder_type holder;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment