pybind11
pybind11 copied to clipboard
Expand string_caster support to uint8_t and std::byte
Description
I would like to get easier handling of std::basic_string and std::basic_string_view for uint8_t and std::byte underlying types.
Those types are meant to represent raw data and thus should skip decoding / encoding steps, which the existing code already has support for using string_caster::load_raw and py::bytes.
Let me know if that looks like it belongs there, I still need to add test coverage before that goes in (have tested on my external use case).
Suggested changelog entry:
Add support for conversion of std::string_view<uint8_t> and std::string_viewstd::byte.
~Hmm, okay I am not sure why the CI isn't running for this PR... Thoughts @henryiii @rwgk?~
Update: Working now