为什么在 Cython 中可以包装
std::pair<int, Foo*> myPair;
但不是
std::pair<Foo*,Bar*> myPair;
特别是,在 Cython 中的包装std::pair
如下:
pair[int, Foo*]
并且工作顺利,但是当第一个元素也是指针时,我遇到了问题:
pair[Foo*,Bar*] myPair2
我越来越
pair[Foo*,Bar*] myPair2
^
------------------------------------------------------------
test.pyx:50:17: Expected an identifier or literal
我在 Linux 上使用 Cython 0.17.1、g++ 4.4