DEADSOFTWARE

Reader split into files
[odcread.git] / typepath / toString.cc
1 #include "typepath/typepath.ih"
3 namespace odc {
5 template<class T, class A> T join(const A & begin, const A & end, const T &sep) {
6 T result;
8 if (begin != end) {
9 A it = begin;
10 result.append(*it);
11 for (++it; it != end; ++it) {
12 result.append(sep).append(*it);
13 }
14 }
16 return result;
17 }
19 std::string TypePath::toString() const {
20 return join(begin(), end(), std::string("->"));
21 }
23 } // namespace odc