mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
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:
@@ -139,7 +139,7 @@ template <>
|
||||
struct formatter<hf3fs::meta::client::ServerSelectionStrategy::NodeInfo> : formatter<std::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const hf3fs::meta::client::ServerSelectionStrategy::NodeInfo &node, FormatContext &ctx) const {
|
||||
return format_to(ctx.out(), "[{}]@{}.{}", node.address, node.nodeId, node.hostname);
|
||||
return fmt::format_to(ctx.out(), "[{}]@{}.{}", node.address, node.nodeId, node.hostname);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -578,15 +578,15 @@ template <>
|
||||
struct formatter<hf3fs::storage::client::RoutingTarget> : formatter<std::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(const hf3fs::storage::client::RoutingTarget &routingTarget, FormatContext &ctx) const {
|
||||
return format_to(ctx.out(),
|
||||
"{}@{}@{}:{}@{}:{}#{}",
|
||||
routingTarget.chainId,
|
||||
routingTarget.chainVer,
|
||||
routingTarget.routingInfoVer,
|
||||
routingTarget.targetInfo.targetId,
|
||||
routingTarget.targetInfo.nodeId,
|
||||
routingTarget.channel.id,
|
||||
routingTarget.channel.seqnum);
|
||||
return fmt::format_to(ctx.out(),
|
||||
"{}@{}@{}:{}@{}:{}#{}",
|
||||
routingTarget.chainId,
|
||||
routingTarget.chainVer,
|
||||
routingTarget.routingInfoVer,
|
||||
routingTarget.targetInfo.targetId,
|
||||
routingTarget.targetInfo.nodeId,
|
||||
routingTarget.channel.id,
|
||||
routingTarget.channel.seqnum);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user