Re: Wrapping cpp type with integer parameters

2017-10-28 Thread Araq
Will give it a shot, doesn't look too hard to fix.

Re: Wrapping cpp type with integer parameters

2017-10-28 Thread mratsim
@wizzardx I tried similar things to work around importing [this templated C++ generic types bug](https://github.com/nim-lang/Nim/issues/6415) C extern function: Too much boilerplate code is needed on the C++ side and on the Nim side, "So you provided bindings for [T: SomeSignedInt] well now do

Re: Wrapping cpp type with integer parameters

2017-10-28 Thread wizzardx
I'm pretty clueless here, but just some 2c. How well is this handled in other non-C++ langs or tools which do have interop with C++? Some examples that come to mind: D lang, Python with pybind11, and SWIG. And a couple of other usual things - providing a C extern function from C++ that somehow

Re: Wrapping cpp type with integer parameters

2017-10-27 Thread BigEpsilon
Yes I looked into that but I don't think I'm going to do it for the lake of time.

Re: Wrapping cpp type with integer parameters

2017-10-26 Thread Araq
Can't think of a solution except patching the compiler.

Wrapping cpp type with integer parameters

2017-10-25 Thread BigEpsilon
Hi, How can we wrapp a c++ type that depends on a generic numerci parameter. For example, I tried this: Vec* {.importcpp: "cv::Vec<\'0,\'1>", header: cv_core_path, bycopy.}[u_Tp; cn: static[cint]] = object The problem is that it generates: cv::Vec v_X