[PyQt] How to derive from a %MappedType?
Phil Thompson
phil at riverbankcomputing.com
Fri May 26 13:26:18 BST 2017
On 25 May 2017, at 11:16 pm, Shaheed Haque <srhaque at theiet.org> wrote:
>
> Hi Phil,
>
> I'm finally looking to extend my generator to handle templated
> classes, and am finding a curious result from some initial tests. As
> per the example you provided, this SIP compiles just fine:
>
> template<T>
> class MyTemplate
> {
> public:
> MyTemplate();
> };
>
> The issue is that nesting in an OuterClass like this gives a syntax error:
>
> class OuterClass
> {
> template<T>
> class MyTemplate
> {
> public:
> MyTemplate();
> };
> };
>
> Nesting in a namespace compiles just fine. Is that expected?
Current hg (and tonight's snapshot) should parse it. I haven't tested the generated code - but (given it already works with namespaces) it has a reasonable chance of working.
Phil
More information about the PyQt
mailing list