Support rust `Option` and C++ `std::optional`
Author: fbeutelCreated Apr 6, 2020Updated Jun 30, 2026
Labelsnew binding
It would greatly simplify API development if automatic Option<T> conversion was supported.
Since C++17 there is std::optional<T>, which would allow a more or less direct translation of supported types.
I had a look at https://github.com/dtolnay/cxx/pull/67 and the ideas and work done by @myronahn for Vec seems to be similar to what would be needed for supporting Option so maybe one could build on that...
Source: dtolnay/cxx