Code: Select all
void FCS::G2D::ParaConic::initAttrs()
{
ParaCurve::initAttrs();
tieAttr_Child(p0.upcast<ParaObject>(), "p0", &ParaPointPy::Type, true);
tieAttr_Child(reinterpret_cast<HParaObject &>(p1), "p1", &ParaPointPy::Type, true);
}
with
Code: Select all
template < typename NewTypeT,
typename = typename std::enable_if<
std::is_base_of<typename std::decay<NewTypeT>::type, CppType>::value
>::type
>
UnsafePyHandle<NewTypeT> & upcast()
{
return reinterpret_cast<UnsafePyHandle<NewTypeT> &>(*this);
}