mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-09 21:50:45 +01:00
function to convert std::vector to string
This commit is contained in:
parent
35abd05ee9
commit
7b6b712565
@ -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
|
#endif
|
Loading…
x
Reference in New Issue
Block a user