language: C++11 (gcc-4.7.2)
date: 466 days 18 hours ago
link:
visibility: public
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    #include <string>
    #include <iostream> // for the demo only
 
    std::string concat(std::string const& a) {
      return a;
    }
 
    template <typename... Items>
    std::string concat(std::string const& a, std::string const& b, Items&&... args) {
      return concat(a + b, args...);
    }
 
    int main() {
      std::cout << concat("0", "1", "2", "3") << "\n";
    }