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