aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authormikhnenko <mikhnenko@yandex-team.com>2025-01-13 10:16:22 +0300
committermikhnenko <mikhnenko@yandex-team.com>2025-01-13 10:38:15 +0300
commit01ab9e61cd232947ccaf6fdc5cf1b5fb5c5df4e1 (patch)
treec20a71672ce88e12b1ba733c1cd72148992539cf /contrib
parent31f0c8b9a60d0437099b411716d5cdd7857eb67e (diff)
downloadydb-01ab9e61cd232947ccaf6fdc5cf1b5fb5c5df4e1.tar.gz
Fix ambiguous format calls
commit_hash:e343df8242ab940e42f35d1f84945df76f93a396
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libs/jinja2cpp/src/error_info.cpp74
-rw-r--r--contrib/libs/poco/Foundation/src/Format.cpp40
2 files changed, 57 insertions, 57 deletions
diff --git a/contrib/libs/jinja2cpp/src/error_info.cpp b/contrib/libs/jinja2cpp/src/error_info.cpp
index 25ff5dfee7..a5125e95a9 100644
--- a/contrib/libs/jinja2cpp/src/error_info.cpp
+++ b/contrib/libs/jinja2cpp/src/error_info.cpp
@@ -126,53 +126,53 @@ void RenderErrorInfo(std::basic_string<CharT>& result, const ErrorInfoTpl<CharT>
switch (errCode)
{
case ErrorCode::Unspecified:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Parse error").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Parse error").GetValue<CharT>());
break;
case ErrorCode::UnexpectedException:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected exception occurred during template processing. Exception: {}").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected exception occurred during template processing. Exception: {}").GetValue<CharT>(), extraParams[0]);
break;
}
case ErrorCode::MetadataParseError:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Error occurred during template metadata parsing. Error: {}").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Error occurred during template metadata parsing. Error: {}").GetValue<CharT>(), extraParams[0]);
break;
}
case ErrorCode::YetUnsupported:
- format_to(std::back_inserter(out), UNIVERSAL_STR("This feature has not been supported yet").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("This feature has not been supported yet").GetValue<CharT>());
break;
case ErrorCode::FileNotFound:
- format_to(std::back_inserter(out), UNIVERSAL_STR("File not found").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("File not found").GetValue<CharT>());
break;
case ErrorCode::ExpectedStringLiteral:
- format_to(std::back_inserter(out), UNIVERSAL_STR("String expected").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("String expected").GetValue<CharT>());
break;
case ErrorCode::ExpectedIdentifier:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Identifier expected").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Identifier expected").GetValue<CharT>());
break;
case ErrorCode::ExpectedSquareBracket:
- format_to(std::back_inserter(out), UNIVERSAL_STR("']' expected").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("']' expected").GetValue<CharT>());
break;
case ErrorCode::ExpectedRoundBracket:
- format_to(std::back_inserter(out), UNIVERSAL_STR("')' expected").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("')' expected").GetValue<CharT>());
break;
case ErrorCode::ExpectedCurlyBracket:
- format_to(std::back_inserter(out), UNIVERSAL_STR("'}}' expected").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("'}}' expected").GetValue<CharT>());
break;
case ErrorCode::ExpectedToken:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected token '{}'").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected token '{}'").GetValue<CharT>(), extraParams[0]);
if (extraParams.size() > 1)
{
- format_to(std::back_inserter(out), UNIVERSAL_STR(". Expected: ").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR(". Expected: ").GetValue<CharT>());
for (std::size_t i = 1; i < extraParams.size(); ++ i)
{
if (i != 1)
- format_to(std::back_inserter(out), UNIVERSAL_STR(", ").GetValue<CharT>());
- format_to(std::back_inserter(out), UNIVERSAL_STR("\'{}\'").GetValue<CharT>(), extraParams[i]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR(", ").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("\'{}\'").GetValue<CharT>(), extraParams[i]);
}
}
break;
@@ -180,83 +180,83 @@ void RenderErrorInfo(std::basic_string<CharT>& result, const ErrorInfoTpl<CharT>
case ErrorCode::ExpectedExpression:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Expected expression, got: '{}'").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Expected expression, got: '{}'").GetValue<CharT>(), extraParams[0]);
break;
}
case ErrorCode::ExpectedEndOfStatement:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Expected end of statement, got: '{}'").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Expected end of statement, got: '{}'").GetValue<CharT>(), extraParams[0]);
break;
}
case ErrorCode::ExpectedRawEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Expected end of raw block").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Expected end of raw block").GetValue<CharT>());
break;
case ErrorCode::ExpectedMetaEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Expected end of meta block").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Expected end of meta block").GetValue<CharT>());
break;
case ErrorCode::UnexpectedToken:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected token: '{}'").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected token: '{}'").GetValue<CharT>(), extraParams[0]);
break;
}
case ErrorCode::UnexpectedStatement:
{
auto& extraParams = errInfo.GetExtraParams();
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected statement: '{}'").GetValue<CharT>(), extraParams[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected statement: '{}'").GetValue<CharT>(), extraParams[0]);
break;
}
case ErrorCode::UnexpectedCommentBegin:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected comment begin").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected comment begin").GetValue<CharT>());
break;
case ErrorCode::UnexpectedCommentEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected comment end").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected comment end").GetValue<CharT>());
break;
case ErrorCode::UnexpectedRawBegin:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected raw block begin").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected raw block begin").GetValue<CharT>());
break;
case ErrorCode::UnexpectedRawEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected raw block end").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected raw block end").GetValue<CharT>());
break;
case ErrorCode::UnexpectedMetaBegin:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected meta block begin").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected meta block begin").GetValue<CharT>());
break;
case ErrorCode::UnexpectedMetaEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected meta block end").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected meta block end").GetValue<CharT>());
break;
case ErrorCode::UnexpectedExprBegin:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected expression block begin").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected expression block begin").GetValue<CharT>());
break;
case ErrorCode::UnexpectedExprEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected expression block end").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected expression block end").GetValue<CharT>());
break;
case ErrorCode::UnexpectedStmtBegin:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected statement block begin").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected statement block begin").GetValue<CharT>());
break;
case ErrorCode::UnexpectedStmtEnd:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected statement block end").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Unexpected statement block end").GetValue<CharT>());
break;
case ErrorCode::TemplateNotParsed:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Template not parsed").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Template not parsed").GetValue<CharT>());
break;
case ErrorCode::TemplateNotFound:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Template(s) not found: {}").GetValue<CharT>(), errInfo.GetExtraParams()[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Template(s) not found: {}").GetValue<CharT>(), errInfo.GetExtraParams()[0]);
break;
case ErrorCode::InvalidTemplateName:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Invalid template name: {}").GetValue<CharT>(), errInfo.GetExtraParams()[0]);
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Invalid template name: {}").GetValue<CharT>(), errInfo.GetExtraParams()[0]);
break;
case ErrorCode::InvalidValueType:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Invalid value type").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Invalid value type").GetValue<CharT>());
break;
case ErrorCode::ExtensionDisabled:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Extension disabled").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Extension disabled").GetValue<CharT>());
break;
case ErrorCode::TemplateEnvAbsent:
- format_to(std::back_inserter(out), UNIVERSAL_STR("Template environment doesn't set").GetValue<CharT>());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("Template environment doesn't set").GetValue<CharT>());
break;
}
- format_to(std::back_inserter(out), UNIVERSAL_STR("\n{}").GetValue<CharT>(), errInfo.GetLocationDescr());
+ fmt::format_to(std::back_inserter(out), UNIVERSAL_STR("\n{}").GetValue<CharT>(), errInfo.GetLocationDescr());
result = to_string(out);
}
diff --git a/contrib/libs/poco/Foundation/src/Format.cpp b/contrib/libs/poco/Foundation/src/Format.cpp
index ed5db5c21b..2f7900df55 100644
--- a/contrib/libs/poco/Foundation/src/Format.cpp
+++ b/contrib/libs/poco/Foundation/src/Format.cpp
@@ -228,7 +228,7 @@ namespace
std::string format(const std::string& fmt, const Any& value)
{
std::string result;
- format(result, fmt, value);
+ Poco::format(result, fmt, value);
return result;
}
@@ -236,7 +236,7 @@ std::string format(const std::string& fmt, const Any& value)
std::string format(const std::string& fmt, const Any& value1, const Any& value2)
{
std::string result;
- format(result, fmt, value1, value2);
+ Poco::format(result, fmt, value1, value2);
return result;
}
@@ -244,7 +244,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2)
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3)
{
std::string result;
- format(result, fmt, value1, value2, value3);
+ Poco::format(result, fmt, value1, value2, value3);
return result;
}
@@ -252,7 +252,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4);
+ Poco::format(result, fmt, value1, value2, value3, value4);
return result;
}
@@ -260,7 +260,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4, value5);
+ Poco::format(result, fmt, value1, value2, value3, value4, value5);
return result;
}
@@ -268,7 +268,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4, value5, value6);
+ Poco::format(result, fmt, value1, value2, value3, value4, value5, value6);
return result;
}
@@ -276,7 +276,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4, value5, value6, value7);
+ Poco::format(result, fmt, value1, value2, value3, value4, value5, value6, value7);
return result;
}
@@ -284,7 +284,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4, value5, value6, value7, value8);
+ Poco::format(result, fmt, value1, value2, value3, value4, value5, value6, value7, value8);
return result;
}
@@ -292,7 +292,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9);
+ Poco::format(result, fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9);
return result;
}
@@ -300,7 +300,7 @@ std::string format(const std::string& fmt, const Any& value1, const Any& value2,
std::string format(const std::string& fmt, const Any& value1, const Any& value2, const Any& value3, const Any& value4, const Any& value5, const Any& value6, const Any& value7, const Any& value8, const Any& value9, const Any& value10)
{
std::string result;
- format(result, fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10);
+ Poco::format(result, fmt, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10);
return result;
}
@@ -309,7 +309,7 @@ void format(std::string& result, const std::string& fmt, const Any& value)
{
std::vector<Any> args;
args.push_back(value);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -318,7 +318,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
std::vector<Any> args;
args.push_back(value1);
args.push_back(value2);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -328,7 +328,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value1);
args.push_back(value2);
args.push_back(value3);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -339,7 +339,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value2);
args.push_back(value3);
args.push_back(value4);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -351,7 +351,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value3);
args.push_back(value4);
args.push_back(value5);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -364,7 +364,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value4);
args.push_back(value5);
args.push_back(value6);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -378,7 +378,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value5);
args.push_back(value6);
args.push_back(value7);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -393,7 +393,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value6);
args.push_back(value7);
args.push_back(value8);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -409,7 +409,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value7);
args.push_back(value8);
args.push_back(value9);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}
@@ -426,7 +426,7 @@ void format(std::string& result, const std::string& fmt, const Any& value1, cons
args.push_back(value8);
args.push_back(value9);
args.push_back(value10);
- format(result, fmt, args);
+ Poco::format(result, fmt, args);
}