Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

template override function #3316

Open
cmpute opened this issue Jan 18, 2020 · 2 comments
Open

template override function #3316

cmpute opened this issue Jan 18, 2020 · 2 comments

Comments

@cmpute
Copy link

@cmpute cmpute commented Jan 18, 2020

For example in C++ code

void Func[TA](TA a);
void Func[TA, TB](TA a, TB b);

and in cython declaration

cdef extern from ...:
    void Func[TA](TA a)
    void Func[TA, TB](TA a, TB b)

then call Func[int](1) will lead to Wrong number of template arguments: expected 2, got 1

@cmpute

This comment has been minimized.

Copy link
Author

@cmpute cmpute commented Jan 18, 2020

The version I tested is Cython 0.29.14.

Temp work around for this case is:

void Func[TA](TA a)
void Func_2 "Func" [TA, TB](TA a, TB b)
@scoder

This comment has been minimized.

Copy link
Contributor

@scoder scoder commented Jan 24, 2020

Could just the the error reporting that's overly strict here. PR welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.