add fmt:: namespace to distinguish from std::format_to (#43)

When compiled with new toolchain that implements std::format_to, it become
ambiguous on which one should be called. Due to argument-dependent lookup, even
if we are not `using namespace std;` the std version is still considered. So
let's add fmt:: to avoid ambiguous compilation error.
This commit is contained in:
胡玮文
2025-03-03 08:07:52 +08:00
committed by GitHub
parent 309a258ac2
commit 165f09a7b4
13 changed files with 56 additions and 56 deletions

View File

@@ -134,11 +134,11 @@ template <>
struct formatter<hf3fs::meta::server::FileSession> : formatter<std::string_view> {
template <typename FormatContext>
auto format(const hf3fs::meta::server::FileSession &session, FormatContext &ctx) const {
return format_to(ctx.out(),
"{{inodeId {}, client {}, session {}}}",
session.inodeId,
session.clientId,
session.sessionId);
return fmt::format_to(ctx.out(),
"{{inodeId {}, client {}, session {}}}",
session.inodeId,
session.clientId,
session.sessionId);
}
};