[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Literals as template parameters
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2017-06-23 7:55:07
Message-ID: CCCEA0E6-1DBD-4F5F-856B-6270BC8316AB () riverbankcomputing ! com
[Download RAW message or body]

On 22 Jun 2017, at 5:59 pm, Shaheed Haque <srhaque@theiet.org> wrote:
> 
> Hi Phil,
> 
> SIP 4.19.3.dev1706161918 does not seem to like literals (or at least
> literal numbers) as template paramters. The "16" here:
> 
> static int parseParenthesizedList(const QByteArray &data,
> QVarLengthArray<QByteArray, 16> &result, int start = 0)
> [int (const QByteArray &data, QVarLengthArray<QByteArray,
> 16> &result, int start = 0)];
> 
> results in a syntax error. Temporarily changing the "16" to "a16"
> suppresses the error. (i've not been able to think of a way to use
> this as a workaround though).

The workaround is to define a C++ typedef in the %ModuleHeaderCode or %TypeHeaderCode \
and use that typedef in the declaration (and the mapped type definition that will be \
needed).

Phil
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic