diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-26 16:06:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-26 16:06:33 +0100 |
| commit | ecd8cbc534e82d0644d15fa483c2b6bf54876276 (patch) | |
| tree | 3b82a01866a600514e2b92fa18987e00165f60e8 /src | |
| parent | b7d81e736dc35325e98c558067c157b000b856c1 (diff) | |
Forward-port raw_convert precision parameter from v0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/raw_convert.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raw_convert.h b/src/raw_convert.h index 37cddbf0..fe847c90 100644 --- a/src/raw_convert.h +++ b/src/raw_convert.h @@ -27,11 +27,11 @@ namespace dcp { */ template <typename P, typename Q> P -raw_convert (Q v) +raw_convert (Q v, int precision = 16) { std::stringstream s; s.imbue (std::locale::classic ()); - s << std::setprecision (16); + s << std::setprecision (precision); s << v; P r; s >> r; |
