On Tue, Nov 6, 2012 at 2:06 AM, Carlo Nicolini <
nicolin...@gmail.com> wrote:
> Hello, I have the following problem in Cython 0.17.1
>
>
> My C++ class is something like:
>
> class Tmp
> {
> public:
> std::pair<Foo*,Bar*> myPair;
> std::pair<int, Bar*> myPair2;
> }
>
> It seems that in Cython I can't declare a pair containing as first and
> second element pointers to two classes, like for example
>
> pair[Foo*, Bar*] myPair
>
> I get:
>
> pair[Foo*,Bar*] myPair2
> ^
> ------------------------------------------------------------
> prova.pyx:55:17: Expected an identifier or literal
>
>
> while the following is possible:
>
> pair[int, Bar*] myPair2
>
> How is possible to use pair with first and second arguments as pointers? Why
> this behaviour?
Looks like a bug to me:
http://trac.cython.org/cython_trac/ticket/793
A workaround is to use typedefs, but that's not very satisfying...
- Robert