Created
May 10, 2017 16:29
-
-
Save deque-blog/b0e9b05482fc84f0fd9d259bf18bffb0 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
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