Merge remote-tracking branch 'origin/shared_ptr_const_conv' into shared_ptr_derived_2
This commit is contained in:
commit
377d439964
4 changed files with 77 additions and 2 deletions
|
|
@ -83,6 +83,14 @@ namespace swig {
|
|||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
template<class Type>
|
||||
struct traits_from<std::shared_ptr<const Type> > {
|
||||
static VALUE from(const std::shared_ptr<const Type>& val) {
|
||||
std::shared_ptr<Type> p = std::const_pointer_cast<Type>(val);
|
||||
return swig::from(p);
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue