rgw: format the URL port through std::string_view
Building against system fmt 10 fails: /usr/include/fmt/core.h:2548:45: error: 'fmt::v10::detail::type_is_unformattable_for<boost::core::basic_string_view<char>, char> _' has incomplete type /usr/include/fmt/core.h:1580:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt url_view::port() returns a boost::core::string_view. It does convert to std::string_view, but only through a template conversion operator, and the trait fmt uses to decide whether an argument is string-like does not look through those until fmt 11. The other argument is fine: host() goes through the token API and hands back a std::string. Do the conversion at the call site. src/CMakeLists.txt takes system fmt anywhere from 8.1.1 to 11.1.4, so this has to compile against the old ones as well, and the bundled 11.1.4 does not care either way. Signed-off-by: Kefu Chai <k.chai@proxmox.com>
K
Kefu Chai committed
961194a5e9eeabc149dff8eacbd2cd55d6676e72
Parent: 83cf4c1