| 15 | namespace { |
| 16 | template<typename Range, typename Value = typename Range::value_type> |
| 17 | std::string |
| 18 | join(Range const& elements, const char* const delimiter) |
| 19 | { |
| 20 | std::ostringstream os; |
| 21 | auto b = begin(elements), e = end(elements); |
| 22 | |
| 23 | if (b == e) { |
| 24 | return ""; |
| 25 | } |
| 26 | |
| 27 | std::copy(b, prev(e), std::ostream_iterator<Value>(os, delimiter)); |
| 28 | os << *prev(e); |
| 29 | |
| 30 | return os.str(); |
| 31 | } |
| 32 | } // namespace |
| 33 | |
| 34 | static const std::string ELLIPSIS = "..."; |
no outgoing calls
no test coverage detected