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
commitf49cf886c755668578b0214ab9eae8ecdc1395a8 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/string/split.h
parentb99e8e1b6e3468f81111414c917adc2d334b2c3c (diff)
downloadydb-f49cf886c755668578b0214ab9eae8ecdc1395a8.tar.gz
Restoring authorship annotation for <kaa@yandex-team.ru>. Commit 2 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 29fafd7890..bc46d9e64c 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)