Skip to content

Instantly share code, notes, and snippets.

@crabtw
Last active April 28, 2017 03:09
Show Gist options
  • Save crabtw/26dff203892fb53b1ab72afda501f1ba to your computer and use it in GitHub Desktop.
Save crabtw/26dff203892fb53b1ab72afda501f1ba to your computer and use it in GitHub Desktop.
#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