Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Created May 10, 2017 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/b0e9b05482fc84f0fd9d259bf18bffb0 to your computer and use it in GitHub Desktop.
Save deque-blog/b0e9b05482fc84f0fd9d259bf18bffb0 to your computer and use it in GitHub Desktop.
template <typename ...Args>
void log_trace(std::ostream& out,
std::string const& prefix,
Args const& ...args)
{
out << prefix << "(";
hana::for_each(
hana::intersperse(hana::make_tuple(args...), ", "),
[&out](auto const& arg) { out << arg; });
out << ")\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment