[PyQt] How to derive from a %MappedType?

Shaheed Haque srhaque at theiet.org
Fri May 26 16:47:04 BST 2017


On 26 May 2017 13:26, "Phil Thompson" <phil at riverbankcomputing.com> wrote:

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


Cool. I will take a look. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20170526/bb12b1fb/attachment.html>


More information about the PyQt mailing list