[PyQt] SIP template-based class with argument having default constructor as default value

Phil Thompson phil at riverbankcomputing.com
Thu Jun 22 15:20:30 BST 2017


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


More information about the PyQt mailing list