From 5410afe63e8302bb91279cfd391f95dc2f49bfc3 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Mon, 26 Aug 2013 18:11:54 +0200
Subject: [PATCH] Remove serialExecute() overload for iterators.

---
 AssemblerLib/SerialExecutor.h             | 18 ------------------
 Tests/AssemblerLib/TestSerialExecutor.cpp | 10 +---------
 2 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/AssemblerLib/SerialExecutor.h b/AssemblerLib/SerialExecutor.h
index 6b2253f904a..770314d359d 100644
--- a/AssemblerLib/SerialExecutor.h
+++ b/AssemblerLib/SerialExecutor.h
@@ -35,24 +35,6 @@ serialExecute(F const& f, C const& c)
         f(c[i], i);
 };
 
-/// Executes a \c f for each element from the input range [first, last)
-/// Return values of the function call are ignored.
-///
-/// \tparam F   \c f type.
-/// \tparam I   input iterator type.
-///
-/// \param f        a function accepting a pointer to container's elements and
-///                 an index as arguments.
-/// \param first    iterator to the first element.
-/// \param last     iterator to one after the last element.
-template <typename F, typename I>
-void
-serialExecute(F const& f, I first, I last)
-{
-    std::size_t count = 0;
-    while (first != last)
-        f(*first++, count++);
-};
 }   // namespace AssemblerLib
 
 #endif  // ASSEMBLERLIB_SERIALEXECUTOR_H_H
diff --git a/Tests/AssemblerLib/TestSerialExecutor.cpp b/Tests/AssemblerLib/TestSerialExecutor.cpp
index 015669ea7de..2850c539202 100644
--- a/Tests/AssemblerLib/TestSerialExecutor.cpp
+++ b/Tests/AssemblerLib/TestSerialExecutor.cpp
@@ -59,16 +59,8 @@ TYPED_TEST_P(AssemblerLibSerialExecutor, ContainerArgument)
     ASSERT_TRUE(this->referenceIsZero());
 }
 
-TYPED_TEST_P(AssemblerLibSerialExecutor, IteratorArgument)
-{
-    AssemblerLib::serialExecute(
-        std::bind(&TestFixture::subtractFromReference, this, _1, _2),
-        this->container.begin(), this->container.end());
-    ASSERT_TRUE(this->referenceIsZero());
-}
-
 REGISTER_TYPED_TEST_CASE_P(AssemblerLibSerialExecutor,
-    ContainerArgument, IteratorArgument);
+    ContainerArgument);
 
 
 typedef ::testing::Types <
-- 
GitLab