[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Overloaded make() with pybind11
From: |
Daniel Estévez |
Subject: |
Overloaded make() with pybind11 |
Date: |
Fri, 22 Jan 2021 19:09:15 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
Hi,
I'm porting gr-satellites to GNU Radio 3.9. I have some blocks that have
an overloaded make() method, for example:
https://github.com/daniestevez/gr-satellites/blob/master/include/satellites/decode_rs.h
Maybe this wasn't a very wise design decision on my side.
Now I'm wondering if it's possible to use this with pybind11, and if so
how to do it.
gr_modtool bind (with pygccxml installed) is generating this:
https://gist.github.com/daniestevez/a3d0aaf7e6b2a68933ebb30e9043e7ac
which gives build problems like
/home/daniel/gr-satellites/python/bindings/decode_rs_python.cc: In
function 'void bind_decode_rs(pybind11::module&)':
/home/daniel/gr-satellites/python/bindings/decode_rs_python.cc:39:39:
error: no matching function for call to 'init(<unresolved overloaded
function type>)'
39 | .def(py::init(&decode_rs::make),
| ^
Best,
Daniel.
OpenPGP_signature
Description: OpenPGP digital signature
- Overloaded make() with pybind11,
Daniel Estévez <=