diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-08-19 12:35:03 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-08-19 12:35:03 +0200 |
commit | d308aeaf53b7324af98dfa949a747526c241ef30 (patch) | |
tree | acae7f07b45d26007e8a6bbc3d6c8bfa1bf5e34c /src/libutil/util.hh | |
parent | 297b762513ad416582c0850095506f802ff5b1bb (diff) |
Store Nix integers as longs
So on 64-bit systems, integers are now 64-bit.
Fixes #158.
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 6c83987c5..86c65b763 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'. */ |