diff options
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 6c83987c5d46..86c65b763d00 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -319,7 +319,12 @@ template<class N> bool string2Int(const string & s, N & n) return str && str.get() == EOF; } -string int2String(int n); +template<class N> string int2String(N n) +{ + std::ostringstream str; + str << n; + return str.str(); +} /* Return true iff `s' ends in `suffix'. */ |