cql3, locator: call fmt::format_to() explicitly
since format_to() is defined included by both fmt and std namepaces, without specifying which one to use, we'd fail to build with the standard library which implements std::format_to(). yes, we are `using namespace std` somewhere. this change should address the FTBFS with GCC-13. Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
@@ -821,10 +821,10 @@ struct fmt::formatter<cql3::expr::expression> {
|
||||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const cql3::expr::expression& expr, FormatContext& ctx) {
|
||||
auto format(const cql3::expr::expression& expr, FormatContext& ctx) const {
|
||||
std::ostringstream os;
|
||||
os << expr;
|
||||
return format_to(ctx.out(), "{}", os.str());
|
||||
return fmt::format_to(ctx.out(), "{}", os.str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -836,10 +836,10 @@ struct fmt::formatter<cql3::expr::expression::printer> {
|
||||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const cql3::expr::expression::printer& pr, FormatContext& ctx) {
|
||||
auto format(const cql3::expr::expression::printer& pr, FormatContext& ctx) const {
|
||||
std::ostringstream os;
|
||||
os << pr;
|
||||
return format_to(ctx.out(), "{}", os.str());
|
||||
return fmt::format_to(ctx.out(), "{}", os.str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -854,6 +854,6 @@ struct fmt::formatter<cql3::expr::column_value> {
|
||||
auto format(const cql3::expr::column_value& col, FormatContext& ctx) {
|
||||
std::ostringstream os;
|
||||
os << col;
|
||||
return format_to(ctx.out(), "{}", os.str());
|
||||
return fmt::format_to(ctx.out(), "{}", os.str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -308,7 +308,7 @@ struct fmt::formatter<locator::effective_replication_map::factory_key> {
|
||||
auto format(const locator::effective_replication_map::factory_key& key, FormatContext& ctx) {
|
||||
std::ostringstream os;
|
||||
os << key;
|
||||
return format_to(ctx.out(), "{}", os.str());
|
||||
return fmt::format_to(ctx.out(), "{}", os.str());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user