Skip to content

Instantly share code, notes, and snippets.

@ivcn
Created April 6, 2017 13:43
Show Gist options
  • Select an option

  • Save ivcn/a912e5719bcb799bcf3da7da0165011e to your computer and use it in GitHub Desktop.

Select an option

Save ivcn/a912e5719bcb799bcf3da7da0165011e to your computer and use it in GitHub Desktop.
How to send several values to stream until C++17
template<typename... Args>
void print(Args&&... args) {
using dummy = int[];
(void)dummy{0, (void(cout << std::forward<Args>(args)), 0)...};
cout << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment