Remove Append and StringAppend

pull/43/head
Tatsuhiro Tsujikawa 2013-01-15 21:46:03 +09:00
parent 6a976a4118
commit 88580da587
2 changed files with 1 additions and 22 deletions

View File

@ -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:

View File

@ -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());
}