This commit is contained in:
Chao Liu
2019-03-09 12:52:16 -06:00
parent 04c5527d07
commit 43cd8529c2
8 changed files with 39 additions and 39 deletions

View File

@@ -8,16 +8,16 @@
#include <iostream>
template <class Range>
std::ostream& LogRange(std::ostream& os, Range&& r, std::string delim)
std::ostream& LogRange(std::ostream& os, Range&& range, std::string delim)
{
bool first = true;
for(auto&& x : r)
for(auto&& v : range)
{
if(first)
first = false;
else
os << delim;
os << x;
os << v;
}
return os;
}