mirror of https://github.com/mamba-org/mamba.git
Use fmt::runtime where needed in C++20 (#3962)
This commit is contained in:
parent
703c8d7602
commit
6e4be2889c
|
@ -432,7 +432,7 @@ namespace mamba
|
|||
}
|
||||
else
|
||||
{
|
||||
return fmt::format(m_format, val, w);
|
||||
return fmt::format(fmt::runtime(m_format), val, w);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1314,8 +1314,12 @@ namespace mamba::solver
|
|||
{
|
||||
const auto style = tn.status ? m_format.available : m_format.unavailable;
|
||||
auto [versions_trunc, size] = node.versions_trunc();
|
||||
write(fmt::format(style, (size == 1 ? "{} {}" : "{} [{}]"), node.name(), versions_trunc)
|
||||
);
|
||||
write(fmt::format(
|
||||
style,
|
||||
fmt::runtime(size == 1 ? "{} {}" : "{} [{}]"),
|
||||
node.name(),
|
||||
versions_trunc
|
||||
));
|
||||
}
|
||||
};
|
||||
std::visit(do_write, concat_nodes(tn.ids));
|
||||
|
@ -1381,7 +1385,7 @@ namespace mamba::solver
|
|||
{
|
||||
write(fmt::format(
|
||||
style,
|
||||
(size == 1 ? "{} {}" : "{} [{}]"),
|
||||
fmt::runtime(size == 1 ? "{} {}" : "{} [{}]"),
|
||||
edges.name(),
|
||||
relevant_vers_builds_trunc
|
||||
));
|
||||
|
|
|
@ -419,7 +419,7 @@ namespace mamba::specs
|
|||
// with the custom parser
|
||||
// return fmt::format("{:{}}", *this, level);
|
||||
auto fmt = fmt::format("{{:{}}}", level);
|
||||
return fmt::format(fmt, *this);
|
||||
return fmt::format(fmt::runtime(fmt), *this);
|
||||
}
|
||||
|
||||
auto Version::to_string_glob() const -> std::string
|
||||
|
|
|
@ -807,7 +807,7 @@ fmt::formatter<mamba::specs::VersionSpec>::format(
|
|||
}
|
||||
if constexpr (std::is_same_v<Token, tree_type::variable_type>)
|
||||
{
|
||||
out = fmt::format_to(out, conda_build_form ? "{:b}" : "{}", token);
|
||||
out = fmt::format_to(out, fmt::runtime(conda_build_form ? "{:b}" : "{}"), token);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue