Open
Description
bindgen doesn't pass on quite all the information we need in order to be able to generate autocxx bindings. Options in the future might be to fork bindgen, ask very nicely if they mind us upstreaming patches to add metadata, or switch away from bindgen and use llvm directly.
In any case this bug will be a live tracker of all known cases where we don't have all the information that we require about the underlying C++.
- Classes vs structs. Both present as
struct
s in the bindgen output. When we then generate extra C++ we have to plump for one or the other. In some ABIs this will result in a binary incompatibility or failure to compile. Per Classes result in build warnings; build failure on Windows #54. - Overloaded methods vs methods ending in digits. Two methods
a(uint32_t)
anda(uint8_t)
will be output asa
anda1
. There is no way for us to distinguish that from methods really calleda
anda1
. Worse, this is across all the types in a namespace, soMyStruct::a
andMyOtherStruct::a
becomeMyStruct::a
andMyOtherStruct::a1
. - Nested types. A
struct
nested inside anotherstruct
is not noted in the bindgen output, so we can't generate compatible C++ code - Nested types don't work #115. - Private constructors. Per Types without constructors do not gain a make_unique #122.
- Pointers vs references. Per Handle pointers #102.
- Virtual functions. Per Support calling virtual functions #195 and Allow calling pure virtual functions #305.
- When template params are unused, per Gracefully avoid cases where template parameters are skipped #414 and Skip cases where references to template parameters are skipped #416.
- Deleted functions, per Don't generate bindings for deleted functions #426.