Skip to content

Commit 28a3784

Browse files
committed
Expand documentation about C++ bindings generation
1 parent 287c560 commit 28a3784

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,23 @@ There are a few options documented when running `./bindgen --help`.
156156

157157
### C++
158158

159-
This fork of rust-bindgen can handle a number of C++ features.
159+
`bindgen` can handle most C++ features, but not all of them (C++ is hard!)
160+
161+
Notable C++ features that are unsupported or only partially supported:
162+
163+
* Partial template specialization
164+
* Traits templates
165+
* SFINAE
166+
* Instantiating new template specializations
160167

161168
When passing in header files, the file will automatically be treated as C++ if
162169
it ends in ``.hpp``. If it doesn't, ``-x c++`` can be used to force C++ mode.
163170

171+
You must use whitelisting when working with C++ to avoid pulling in all of the
172+
`std::*` types, some of which `bindgen` cannot handle. Additionally, you may
173+
want to blacklist other types that `bindgen` stumbles on, or make `bindgen`
174+
treat certain types as opaque.
175+
164176
### Annotations
165177

166178
The translation of classes, structs, enums, and typedefs can be adjusted using

0 commit comments

Comments
 (0)