From 88580da587523998e15caa27c5a988b00f22fa9f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 15 Jan 2013 21:46:03 +0900 Subject: [PATCH] Remove Append and StringAppend --- src/a2functional.h | 17 ----------------- test/FeatureConfigTest.cc | 6 +----- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/a2functional.h b/src/a2functional.h index 0f31b02c..c73bd567 100644 --- a/src/a2functional.h +++ b/src/a2functional.h @@ -177,23 +177,6 @@ public: } }; -template -class Append { -private: - T& to_; - T delim_; -public: - template - Append(T& to, const S& delim):to_(to), delim_(delim) {} - - template - void operator()(const S& s) { - to_ += s+delim_; - } -}; - -typedef Append StringAppend; - template class auto_delete { private: diff --git a/test/FeatureConfigTest.cc b/test/FeatureConfigTest.cc index f9660bda..7ee2a26b 100644 --- a/test/FeatureConfigTest.cc +++ b/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()); }