@@ -69,51 +69,6 @@ struct function_traits<R (T::*)(Args...) const> {
69
69
using argument_types = std::tuple<Args...>;
70
70
};
71
71
72
- } // end namespace swift
73
-
74
- #if !defined(swiftCore_EXPORTS)
75
- namespace llvm {
76
-
77
- // / @{
78
-
79
- // / An STL-style algorithm similar to std::for_each that applies a second
80
- // / functor between every pair of elements.
81
- // /
82
- // / This provides the control flow logic to, for example, print a
83
- // / comma-separated list:
84
- // / \code
85
- // / interleave(names.begin(), names.end(),
86
- // / [&](StringRef name) { OS << name; },
87
- // / [&] { OS << ", "; });
88
- // / \endcode
89
- template <typename ForwardIterator, typename UnaryFunctor,
90
- typename NullaryFunctor>
91
- inline void interleave (ForwardIterator begin, ForwardIterator end,
92
- UnaryFunctor each_fn,
93
- NullaryFunctor between_fn) {
94
- if (begin == end)
95
- return ;
96
- each_fn (*begin);
97
- ++begin;
98
- for (; begin != end; ++begin) {
99
- between_fn ();
100
- each_fn (*begin);
101
- }
102
- }
103
-
104
- template <typename Container, typename UnaryFunctor, typename NullaryFunctor>
105
- inline void interleave (const Container &c, UnaryFunctor each_fn,
106
- NullaryFunctor between_fn) {
107
- interleave (c.begin (), c.end (), each_fn, between_fn);
108
- }
109
-
110
- // / @}
111
-
112
- } // end namespace llvm
113
- #endif
114
-
115
- namespace swift {
116
-
117
72
// / @{
118
73
119
74
// / The equivalent of std::for_each, but for two lists at once.
0 commit comments