[PyQt] [SIP] template based return value

Phil Thompson phil at riverbankcomputing.com
Mon Apr 2 15:35:43 BST 2018


On 2 Apr 2018, at 1:30 pm, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> 
> Hi all, hi Phil,
> 
> I have a C++ template based method as follows:
> 
> template<class T>
> T myMethod( T &myVar );
> 
> In this method, T is expected to be an enum (not knowing which enum of course).
> 
> I get a syntax error when I use the same code in sip.
> 
> Is there a way to get around this?
> I suspect that's not possible, but would like to be sure!

You are right I'm afraid. I consider it a bug but I haven't got around to fixing it.

Phil


More information about the PyQt mailing list