Re: SIP v4.19.23 adds dependency on assignment operator
Phil Thompson <[email protected]> Fri, 26 Jun 2020 15:28:43 +0100
| Newsgroups | gmane.comp.python.pyqt-pykde |
|---|---|
| Message-ID | <[email protected]> |
On 26/06/2020 15:10, Jochen Sprickerhof wrote: > Hi Phil, > > thanks for the fast reply! > > * Phil Thompson <[email protected]> [2020-06-26 14:46]: >> So you need to tell SIP this by defining a private assignment >> operator. > > I tried that but SIP still generates code that is refused by gcc: > > orocos_kdl/src/chainiksolvervel_pinv_givens.hpp: > > + private: > + ChainIkSolverVel_pinv_givens& operator=(const > ChainIkSolverVel_pinv_givens& other); > > python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp: > > extern "C" {static void > dealloc_ChainIkSolverVel_pinv_givens(sipSimpleWrapper *);} > static void dealloc_ChainIkSolverVel_pinv_givens(sipSimpleWrapper > *sipSelf) > { > if (sipIsDerivedClass(sipSelf)) > reinterpret_cast<sipChainIkSolverVel_pinv_givens > *>(sipGetAddress(sipSelf))->sipPySelf = SIP_NULLPTR; > > if (sipIsOwnedByPython(sipSelf)) > { > release_ChainIkSolverVel_pinv_givens(sipGetAddress(sipSelf), > sipIsDerivedClass(sipSelf)); > } > } > > python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp: In function ‘void > assign_ChainIkSolverVel_pinv_givens(void*, Py_ssize_t, void*)’: > python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp:1047:137: error: > ‘KDL::ChainIkSolverVel_pinv_givens& > KDL::ChainIkSolverVel_pinv_givens::operator=(const > KDL::ChainIkSolverVel_pinv_givens&)’ is private within this context > 1047 | if (sipIsDerivedClass(sipSelf)) > > Do you have an idea why? You'll have to send me the relevant .sip files. > Also, the assignment operator is already removed by the compiler, > having to manually define it private sounds superfluous. SIP isn't a full C++ parser - it doesn't know that the compiler will delete the operator. Phil