fork(40) download
#include 
#include 

namespace aux{
template struct seq{};

template
struct gen_seq : gen_seq{};

template
struct gen_seq<0, Is...> : seq{};

template
void print_tuple(std::basic_ostream& os, Tuple const& t, seq){
  using swallow = int[];
  (void)swallow{0, (void(os << (Is == 0? "" : ", ") << std::get(t)), 0)...};
}
} // aux::

template
auto operator<<(std::basic_ostream& os, std::tuple const& t)
    -> std::basic_ostream&
{
  os << "(";
  aux::print_tuple(os, t, aux::gen_seq());
  return os << ")";
}

int main(){
  std::cout << std::make_tuple(5, "Hello", -0.1) << "\n";
  std::cout << std::make_tuple() << "\n";
}
Success #stdin #stdout 0s 2896KB
stdin
Standard input is empty
stdout
(5, Hello, -0.1)
()