Rewritten Accept-Features handling. * src/HttpRequestCommand.cc (createHttpRequest) * src/a2functional.h
@@ -2,6 +2,7 @@
Rewritten Accept-Features handling.
* src/HttpRequestCommand.cc (createHttpRequest)
+ * src/a2functional.h
2008-05-12 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
@@ -159,6 +159,23 @@ 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) {}
+
+ void operator()(const S& s) {
+ _to += s+_delim;
+ }
+};
+typedef Append<std::string> StringAppend;
} // namespace aria2
#endif // _D_A2_FUNCTIONAL_H_