diff options
author | Aapo Alasuutari <aapo.alasuutari@gmail.com> | 2021-12-05 21:53:00 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2021-12-07 00:19:02 +0100 |
commit | 421e0eea167f7b4cc6607cd85fd7eee2a0bca554 (patch) | |
tree | 7e303775c21338e08bab2880f209fecb20ea68c4 | |
parent | b1af6a42f583badc425c10cbbefb9dc4c833301e (diff) |
Add note about RVO in cpp.md
`bindgen`'s inability to currently support RVO should be noted in C++ bindings generation document.
-rw-r--r-- | book/src/cpp.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/book/src/cpp.md b/book/src/cpp.md index 1be7a8a7..75ef8554 100644 --- a/book/src/cpp.md +++ b/book/src/cpp.md @@ -71,3 +71,8 @@ cannot translate into Rust: generate undefined behaviour. See [the tracking issue for exceptions](https://github.com/rust-lang/rust-bindgen/issues/1208) for more details. + +* Return value optimization. C++ compilers will in certain circumstances optimize functions + returning a struct type value to instead take an extra hidden argument that refers + to the return value struct. `bindgen` cannot necessarily know about this optimization and + thus at present `bindgen`-interfaces for these kinds of functions are invalid. |