aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-08-06 11:28:07 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-08-06 12:50:21 +0300
commitde4d7efd8871b850e3ea79164d7661e2299836b7 (patch)
tree47d8cf597b3789a807a4b1cec0a9fd66788767c2 /contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h
parente003b4c129e1381591dcb75a96bf9a970b2b47fb (diff)
downloadydb-de4d7efd8871b850e3ea79164d7661e2299836b7.tar.gz
Update contrib/restricted/abseil-cpp-tstring to 20240722.0
83a5727000e16bc5a94523a0cf1cce75fa86a191
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h')
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h
index 9fc0f37af5..23c51cf95c 100644
--- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/str_join.h
@@ -247,12 +247,20 @@ TString StrJoin(const Range& range, y_absl::string_view separator,
return strings_internal::JoinRange(range, separator, fmt);
}
-template <typename T, typename Formatter>
+template <typename T, typename Formatter,
+ typename = typename std::enable_if<
+ !std::is_convertible<T, y_absl::string_view>::value>::type>
TString StrJoin(std::initializer_list<T> il, y_absl::string_view separator,
Formatter&& fmt) {
return strings_internal::JoinRange(il, separator, fmt);
}
+template <typename Formatter>
+inline TString StrJoin(std::initializer_list<y_absl::string_view> il,
+ y_absl::string_view separator, Formatter&& fmt) {
+ return strings_internal::JoinRange(il, separator, fmt);
+}
+
template <typename... T, typename Formatter>
TString StrJoin(const std::tuple<T...>& value, y_absl::string_view separator,
Formatter&& fmt) {
@@ -269,16 +277,22 @@ TString StrJoin(const Range& range, y_absl::string_view separator) {
return strings_internal::JoinRange(range, separator);
}
-template <typename T>
-TString StrJoin(std::initializer_list<T> il,
- y_absl::string_view separator) {
+template <typename T, typename = typename std::enable_if<!std::is_convertible<
+ T, y_absl::string_view>::value>::type>
+TString StrJoin(std::initializer_list<T> il, y_absl::string_view separator) {
+ return strings_internal::JoinRange(il, separator);
+}
+
+inline TString StrJoin(std::initializer_list<y_absl::string_view> il,
+ y_absl::string_view separator) {
return strings_internal::JoinRange(il, separator);
}
template <typename... T>
TString StrJoin(const std::tuple<T...>& value,
y_absl::string_view separator) {
- return strings_internal::JoinAlgorithm(value, separator, AlphaNumFormatter());
+ return strings_internal::JoinTuple(value, separator,
+ std::index_sequence_for<T...>{});
}
Y_ABSL_NAMESPACE_END