| 29 | } |
| 30 | |
| 31 | std::string print_bytes(const py::bytes &bytes) { |
| 32 | std::string ret = "bytes["; |
| 33 | const auto value = static_cast<std::string>(bytes); |
| 34 | for (char c : value) { |
| 35 | ret += std::to_string(static_cast<int>(c)) + ' '; |
| 36 | } |
| 37 | ret.back() = ']'; |
| 38 | return ret; |
| 39 | } |
| 40 | |
| 41 | // Test that we properly handle C++17 exception specifiers (which are part of the function |
| 42 | // signature in C++17). These should all still work before C++17, but don't affect the function |
nothing calls this directly
no outgoing calls
no test coverage detected