Suppose I have the following C++ function:
int summap(const map<int,int>& m) {
...
}
I try to call it from Python using cppyy, by sending a dict:
import cppyy
cppyy.include("functions.hpp")
print(cppyy.gbl.summap({55:1,66:2,77:3}))
I get an error:
TypeError: int ::summap(const map<int,int>& v) =>
TypeError: could not convert argument 1
How can I call this function?