aboutsummaryrefslogtreecommitdiffstats
path: root/util/string/split.h
diff options
context:
space:
mode:
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)