1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 01:05:38 +01:00

function to convert std::vector to string

This commit is contained in:
Antonin Portelli 2018-09-10 15:17:32 +01:00
parent 35abd05ee9
commit 7b6b712565

View File

@ -423,4 +423,17 @@ namespace Grid {
}
}
// helper function to read space-separated values
template <typename T>
std::string vecToStr(const std::vector<T> &v)
{
using Grid::operator<<;
std::ostringstream sstr;
sstr << v;
return sstr.str();
}
#endif