Re: SIP v4.19.23 adds dependency on assignment operator

Jochen Sprickerhof <[email protected]> Fri, 26 Jun 2020 16:32:31 +0200
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <[email protected]>
--rPgHZmYkQ+bUEpVC
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* Phil Thompson <[email protected]> [2020-06-26 15:28]:
>>* Phil Thompson <[email protected]> [2020-06-26 14:46]:
>>>So you need to tell SIP this by defining a private assignment=20
>>>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=3D(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=20
>>*sipSelf)
>>{
>>    if (sipIsDerivedClass(sipSelf))
>>        reinterpret_cast<sipChainIkSolverVel_pinv_givens
>>*>(sipGetAddress(sipSelf))->sipPySelf =3D SIP_NULLPTR;
>>
>>    if (sipIsOwnedByPython(sipSelf))
>>    {
>>        release_ChainIkSolverVel_pinv_givens(sipGetAddress(sipSelf),
>>sipIsDerivedClass(sipSelf));
>>    }
>>}
>>
>>python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp: In function =E2=80=98void
>>assign_ChainIkSolverVel_pinv_givens(void*, Py_ssize_t, void*)=E2=80=99:
>>python_orocos_kdl/PyKDL/sip/sipPyKDLpart1.cpp:1047:137: error:
>>=E2=80=98KDL::ChainIkSolverVel_pinv_givens&
>>KDL::ChainIkSolverVel_pinv_givens::operator=3D(const
>>KDL::ChainIkSolverVel_pinv_givens&)=E2=80=99 is private within this conte=
xt
>> 1047 |     if (sipIsDerivedClass(sipSelf))
>>
>>Do you have an idea why?
>
>You'll have to send me the relevant .sip files.

Not sure what you need but there is a PR trying to implement this here:

https://github.com/orocos/orocos_kinematics_dynamics/pull/269

>>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=20
>delete the operator.

Yeah, I guessed so already.

--rPgHZmYkQ+bUEpVC
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAl72BvwACgkQW//cwljm
lDMPuA/9HGn2jRgFiXCHRPkxr4odLxoBLohwNoFyjjO7ixRguJepUhX+iYVtkeO9
iwokp1VQMS0zDUgHtOWHDZBqTIAT8fpYRTENWYDLFVirn4Xemppb1uI60TRrS78y
n0gNQ23Zxx4b3bqd2ypFlM+nrnTN7al1j5ST0wQ2UqHuduYYTLLjJCpZCDHunJVL
djNoShBuvppAG4TfInM/b9S8bHnjCcx4q+b1RvXxj78Lk9f/vaycU4mnkKerH3ft
dPTp6n5eTppg7eTDIDvtwPsyuYbg4k14viAN0hthE37yCgvsdna51oObj6TTly/C
vB72Bx8vCN2Ttu3aq7hKXBh3gyuM87Q25Ze7YZpK97RDXZFvoFgIrdAN2qak4dPW
UZ7LsOYclxsz3h9del72Kc3MvVZ1y2McnaxwPlZomeA+fsVBQ49GO+h+swcKtATG
Yni3DoBngresrYbET1xgBVDmIt3mFOXi4g4hySOfhuKS87gkcuY99MRD25laJ31U
Y26DXRF+msmqd4bNqDVhCRLR4fo9ExB5R9gZavyDzg00L0uFISa7SPaoGft61gDq
l83y9XqiOGlisqPQ5I1Me3pPFWdtZCRM2ObmB2CPSI9lfQ4pwu0lkThlmLAEHl80
0DmvYtM76HdIqUs+bIwMuI54y95/vCNWbR6G1lz+BGnKtFmHhtY=
=70/e
-----END PGP SIGNATURE-----

--rPgHZmYkQ+bUEpVC--