aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-05-31 14:21:19 +0300
committerarkady-e1ppa <arkady-e1ppa@yandex-team.com>2024-05-31 14:33:58 +0300
commit5eae4155cc73047764092527cb69bdfc81ec76eb (patch)
tree1c4c2cc641e534a3837c2e08b7580295cc59b5cf /library/cpp
parent58db65a7db991dbc19347cee58a69b86d1c818b6 (diff)
downloadydb-5eae4155cc73047764092527cb69bdfc81ec76eb.tar.gz
Fix build due to accidental c++23 use
feeb90a4704dca0309a6252ea872283ea9302a4b
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/yt/string/format_analyser-inl.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/library/cpp/yt/string/format_analyser-inl.h b/library/cpp/yt/string/format_analyser-inl.h
index e205fc754e..a548a06072 100644
--- a/library/cpp/yt/string/format_analyser-inl.h
+++ b/library/cpp/yt/string/format_analyser-inl.h
@@ -10,6 +10,11 @@ namespace NYT {
namespace NDetail {
+consteval bool Contains(std::string_view sv, char symbol)
+{
+ return sv.find(symbol) != std::string_view::npos;
+}
+
template <class... TArgs>
consteval void TFormatAnalyser::ValidateFormat(std::string_view fmt)
{
@@ -53,7 +58,7 @@ consteval void TFormatAnalyser::ValidateFormat(std::string_view fmt)
return;
}
- if (specifiers[markerCount].Conversion.contains(symbol)) {
+ if (Contains(specifiers[markerCount].Conversion, symbol)) {
// Marker has finished.
markers[markerCount]
@@ -64,7 +69,7 @@ consteval void TFormatAnalyser::ValidateFormat(std::string_view fmt)
continue;
}
- if (!specifiers[markerCount].Flags.contains(symbol)) {
+ if (!Contains(specifiers[markerCount].Flags, symbol)) {
CrashCompilerWrongFlagSpecifier("Symbol is not a valid flag specifier; See FlagSpecifiers");
}
}