Last active
April 28, 2017 03:09
-
-
Save crabtw/26dff203892fb53b1ab72afda501f1ba to your computer and use it in GitHub Desktop.
This file contains 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
#include <cstdlib> | |
#include <iostream> | |
static void err() { | |
std::cerr << std::endl; | |
exit(1); | |
} | |
template <typename First, typename... Rest> | |
static void err(First&& first, Rest&&... rest) { | |
std::cerr << std::forward<First>(first); | |
err(std::forward<Rest>(rest)...); | |
} | |
int main() { | |
err(1, "2", 3.3); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment