Remove a bunch of dead templates.
authorChris Lattner <sabre@nondot.org>
Tue, 22 Feb 2005 23:19:42 +0000 (23:19 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 22 Feb 2005 23:19:42 +0000 (23:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20275 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/STLExtras.h

index 14b61bc916c33574a105ac63823f170f60cfd708..e13f9f9ce7abfd85623b650e60c5fdb428e8d9c4 100644 (file)
@@ -187,79 +187,6 @@ inline ItTy prior(ItTy it)
   return it;
 }
 
-
-//===----------------------------------------------------------------------===//
-//     Extra additions to <algorithm>
-//===----------------------------------------------------------------------===//
-
-// apply_until - Apply a functor to a sequence continually, unless the
-// functor returns true.  Return true if the functor returned true, return false
-// if the functor never returned true.
-//
-template <class InputIt, class Function>
-bool apply_until(InputIt First, InputIt Last, Function Func) {
-  for ( ; First != Last; ++First)
-    if (Func(*First)) return true;
-  return false;
-}
-
-
-// reduce - Reduce a sequence values into a single value, given an initial
-// value and an operator.
-//
-template <class InputIt, class Function, class ValueType>
-ValueType reduce(InputIt First, InputIt Last, Function Func, ValueType Value) {
-  for ( ; First != Last; ++First)
-    Value = Func(*First, Value);
-  return Value;
-}
-
-#if 1   // This is likely to be more efficient
-
-// reduce_apply - Reduce the result of applying a function to each value in a
-// sequence, given an initial value, an operator, a function, and a sequence.
-//
-template <class InputIt, class Function, class ValueType, class TransFunc>
-inline ValueType reduce_apply(InputIt First, InputIt Last, Function Func, 
-                             ValueType Value, TransFunc XForm) {
-  for ( ; First != Last; ++First)
-    Value = Func(XForm(*First), Value);
-  return Value;
-}
-
-#else  // This is arguably more elegant
-
-// reduce_apply - Reduce the result of applying a function to each value in a
-// sequence, given an initial value, an operator, a function, and a sequence.
-//
-template <class InputIt, class Function, class ValueType, class TransFunc>
-inline ValueType reduce_apply2(InputIt First, InputIt Last, Function Func, 
-                              ValueType Value, TransFunc XForm) {
-  return reduce(map_iterator(First, XForm), map_iterator(Last, XForm),
-               Func, Value);
-}
-#endif
-
-
-// reduce_apply_bool - Reduce the result of applying a (bool returning) function
-// to each value in a sequence.  All of the bools returned by the mapped
-// function are bitwise or'd together, and the result is returned.
-//
-template <class InputIt, class Function>
-inline bool reduce_apply_bool(InputIt First, InputIt Last, Function Func) {
-  return reduce_apply(First, Last, bitwise_or<bool>(), false, Func);
-}
-
-
-// map - This function maps the specified input sequence into the specified
-// output iterator, applying a unary function in between.
-//
-template <class InIt, class OutIt, class Functor>
-inline OutIt mapto(InIt Begin, InIt End, OutIt Dest, Functor F) {
-  return copy(map_iterator(Begin, F), map_iterator(End, F), Dest);
-}
-
-
 //===----------------------------------------------------------------------===//
 //     Extra additions to <utility>
 //===----------------------------------------------------------------------===//