aboutsummaryrefslogtreecommitdiffstats
path: root/util/string
diff options
context:
space:
mode:
authorgrand <grand@yandex-team.ru>2022-02-10 16:50:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:06 +0300
commit7eb3862cccdb866e7e739123c8024ccec628bb62 (patch)
tree5ce974787810a396bb1c1cca605feef8f9e85679 /util/string
parent13dbd0acb78595551b843005d6bd021bdc1a859b (diff)
downloadydb-7eb3862cccdb866e7e739123c8024ccec628bb62.tar.gz
Restoring authorship annotation for <grand@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string')
-rw-r--r--util/string/join.h8
-rw-r--r--util/string/join_ut.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/util/string/join.h b/util/string/join.h
index b166fad1f3..9d9479b1c2 100644
--- a/util/string/join.h
+++ b/util/string/join.h
@@ -173,7 +173,7 @@ inline TBasicString<TCharType> JoinSeq(std::basic_string_view<TCharType> delim,
using std::end;
return JoinRange(delim, begin(data), end(data));
}
-
+
template <typename TCharType, typename TContainer>
inline TBasicString<TCharType> JoinSeq(const TCharType* delim, const TContainer& data) {
TBasicStringBuf<TCharType> delimBuf = delim;
@@ -252,13 +252,13 @@ constexpr auto MakeRangeJoiner(TStringBuf delim, const std::initializer_list<TVa
* If someone needs to join std::initializer_list<TString> -- it still works because of the TContainer template above.
*/
-template <typename T>
+template <typename T>
inline std::enable_if_t<
!std::is_same<std::decay_t<T>, TString>::value && !std::is_same<std::decay_t<T>, const char*>::value,
TString>
JoinSeq(const TStringBuf delim, const std::initializer_list<T>& data) {
- return JoinRange(delim, data.begin(), data.end());
-}
+ return JoinRange(delim, data.begin(), data.end());
+}
inline TString JoinSeq(const TStringBuf delim, const std::initializer_list<TStringBuf>& data) {
return JoinRange(delim, data.begin(), data.end());
diff --git a/util/string/join_ut.cpp b/util/string/join_ut.cpp
index 3ed2b2459c..d69442d18b 100644
--- a/util/string/join_ut.cpp
+++ b/util/string/join_ut.cpp
@@ -34,7 +34,7 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_EQUAL(JoinRange(" ", v, v + 2), "1 2");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {}), "");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {42}), "42");
- UNIT_ASSERT_EQUAL(JoinSeq(" ", {1, 2, 3}), "1 2 3");
+ UNIT_ASSERT_EQUAL(JoinSeq(" ", {1, 2, 3}), "1 2 3");
UNIT_ASSERT_VALUES_EQUAL(JoinSeq(" ", v), "1 2 3");
}