Browse Source

Remove Append and StringAppend

Tatsuhiro Tsujikawa 12 years ago
parent
commit
88580da587
2 changed files with 1 additions and 22 deletions
  1. 0 17
      src/a2functional.h
  2. 1 5
      test/FeatureConfigTest.cc

+ 0 - 17
src/a2functional.h

@@ -177,23 +177,6 @@ public:
   }
 };
 
-template<typename T>
-class Append {
-private:
-  T& to_;
-  T delim_;
-public:
-  template<typename S>
-  Append(T& to, const S& delim):to_(to), delim_(delim) {}
-
-  template<typename S>
-  void operator()(const S& s) {
-    to_ += s+delim_;
-  }
-};
-
-typedef Append<std::string> StringAppend;
-
 template<typename T>
 class auto_delete {
 private:

+ 1 - 5
test/FeatureConfigTest.cc

@@ -79,11 +79,7 @@ void FeatureConfigTest::testFeatureSummary() {
 
   };
 
-  std::string featuresString;
-  std::for_each(vbegin(features), vend(features),
-                StringAppend(featuresString, ", "));
-  featuresString = util::strip(featuresString, ", ");
-
+  std::string featuresString = strjoin(vbegin(features), vend(features), ", ");
   CPPUNIT_ASSERT_EQUAL(featuresString, featureSummary());
 }