aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/split.h
diff options
context:
space:
mode:
authorkaa <kaa@yandex-team.ru>2022-02-10 16:49:28 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:28 +0300
commitb99e8e1b6e3468f81111414c917adc2d334b2c3c (patch)
tree15f9f7cb2949ddab5a853046041062fc9c01fafb /util/string/split.h
parent27222438aa0c42e5d9f8323344ee0cf8909491c3 (diff)
downloadydb-b99e8e1b6e3468f81111414c917adc2d334b2c3c.tar.gz
Restoring authorship annotation for <kaa@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/string/split.h')
-rw-r--r--util/string/split.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/util/string/split.h b/util/string/split.h
index bc46d9e64c..29fafd7890 100644
--- a/util/string/split.h
+++ b/util/string/split.h
@@ -10,7 +10,7 @@
#include <util/generic/store_policy.h>
#include <util/generic/strbuf.h>
#include <util/generic/string.h>
-#include <util/generic/typetraits.h>
+#include <util/generic/typetraits.h>
#include <util/generic/vector.h>
#include <util/generic/ylimits.h>
#include <util/system/compat.h>
@@ -260,28 +260,28 @@ struct TSetDelimiter: private TFindFirstOf<const Char> {
}
};
-namespace NSplitTargetHasPushBack {
+namespace NSplitTargetHasPushBack {
Y_HAS_MEMBER(push_back, PushBack);
-}
-
+}
+
template <class T, class = void>
struct TConsumerBackInserter;
-
+
template <class T>
struct TConsumerBackInserter<T, std::enable_if_t<NSplitTargetHasPushBack::TClassHasPushBack<T>::value>> {
static void DoInsert(T* C, const typename T::value_type& i) {
- C->push_back(i);
- }
-};
-
-template <class T>
+ C->push_back(i);
+ }
+};
+
+template <class T>
struct TConsumerBackInserter<T, std::enable_if_t<!NSplitTargetHasPushBack::TClassHasPushBack<T>::value>> {
static void DoInsert(T* C, const typename T::value_type& i) {
- C->insert(C->end(), i);
- }
-};
-
-template <class T>
+ C->insert(C->end(), i);
+ }
+};
+
+template <class T>
struct TContainerConsumer {
inline TContainerConsumer(T* c) noexcept
: C(c)