Skip to content

Commit

Permalink
Correct string conversion with recent libfmt releases.
Browse files Browse the repository at this point in the history
The older code works with 9.1.0+ds1-2, but fails with 10.1.1. A simple
cast fixes it.
  • Loading branch information
gsmecher committed Jan 29, 2024
1 parent 10132f1 commit 00ff272
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct fmt::formatter<T, std::enable_if_t<std::is_base_of<py::object, T>::value,

template <typename FormatContext>
auto format(py::object const& o, FormatContext& ctx) {
return fmt::formatter<std::string>::format(py::str(o), ctx);
return fmt::formatter<std::string>::format((std::string)py::str(o), ctx);
}
};

Expand Down

0 comments on commit 00ff272

Please sign in to comment.