fork download
  1. #include <string>
  2. #include <iostream> // for the demo only
  3.  
  4. std::string concat(std::string const& a) {
  5. return a;
  6. }
  7.  
  8. template <typename... Items>
  9. std::string concat(std::string const& a, std::string const& b, Items&&... args) {
  10. return concat(a + b, args...);
  11. }
  12.  
  13. int main() {
  14. std::cout << concat("0", "1", "2", "3") << "\n";
  15. }
Success #stdin #stdout 0s 2964KB
stdin
Standard input is empty
stdout
0123