mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +00:00
fix for std::shared_ptr proposed by Vayu (fixes #8)
This commit is contained in:
parent
54289302bc
commit
723bc65b27
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user