[PyQt] SIP template-based class with argument having default constructor as default value
Shaheed Haque
srhaque at theiet.org
Thu Jun 22 17:55:55 BST 2017
Thanks for the replies. To summarise:
1. The "::T has not been defined" should be fixed in a snapshot RSN.
2. There is a workaround for the templated superclass (Denis, thanks
for confirming it works). Do you think it might be addressed in a
subsequent release? I ask because there is plenty of other stuff for
me to get on with that if I can defer writing all the custom logic
this would need, I'll likely just be patient.
Now, speaking of getting on with things, I found two other things that
SIP does not like, but I guess it would be better to start different
threads for those. Phil, do let me know if you prefer me to send
reports in some way other than the mailing list.
On 22 June 2017 at 15:24, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
>
> Indeed that's how I handle these cases.
> Thanks for the fix Phil.
>
> Cheers,
> Denis
>
> Le jeu. 22 juin 2017 à 16:21, Phil Thompson <phil at riverbankcomputing.com> a
> écrit :
>>
>> On 18 Jun 2017, at 5:54 pm, Shaheed Haque <srhaque at theiet.org> wrote:
>> >
>> > And in a similar vein again:
>> >
>> >
>> > template <Class>
>> > class SuperClass: SuperClassTrait<Class>
>> > {
>> > %TypeHeaderCode
>> > #include <AkonadiCore/Supertrait>
>> > %End
>> > // Empty!
>> > };
>> >
>> > causes:
>> >
>> > ERROR: sip: tmp/AkonadiCore/Supertrait.sip:42: syntax error while
>> > processing AkonadiCore/AkonadiCoremod.sip
>>
>> The current syntax for a super-class is very limited. I don't want to make
>> significant changes this close to a release.
>>
>> You might be able to work around it by introducing a typedef...
>>
>> typedef SuperClassTrait<Class> SuperClassTraitClass;
>>
>> class SuperClass : SuperClassTraitClass
>> {
>> };
>>
>> Phil
>> _______________________________________________
>> PyQt mailing list PyQt at riverbankcomputing.com
>> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list