Ticket #552 (new defect)

Opened 3 years ago

Unable to use templated class as base class in C++ inheritance

Reported by: haoyu Owned by: somebody
Priority: major Milestone: wishlist
Component: C++ Keywords:
Cc:

Description

There is no way to declare a C++ class that inherits from a template class yet. The following code will raise syntax error:

from libcpp.vector import vector
cdef extern from "foo.h":
    cdef cppclass VectOfInt(vector[int])

The attached patch could fix this. But the patch needs review and cleanup since I'm unsure about the correctness.

Attachments

cppclass_template_base.patch Download (5.3 KB) - added by haoyu 3 years ago.

Change History

Changed 3 years ago by haoyu

Note: See TracTickets for help on using tickets.