fork download
  1. #include <iostream>
  2. #include <utility>
  3.  
  4. template <typename...Args>
  5. std::ostream& PrintAll(std::ostream& output, Args&&...args)
  6. {
  7. return (output << ... << args) << std::endl;
  8. }
  9.  
  10. int main()
  11. {
  12. PrintAll(std::cout, "Pi", '=', 3.14);
  13. }
  14.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
Pi=3.14