Created
April 6, 2017 13:43
-
-
Save ivcn/a912e5719bcb799bcf3da7da0165011e to your computer and use it in GitHub Desktop.
How to send several values to stream until C++17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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