summaryrefslogtreecommitdiff
path: root/src/raw_convert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/raw_convert.h')
-rw-r--r--src/raw_convert.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/raw_convert.h b/src/raw_convert.h
index 90737c0c..142763f2 100644
--- a/src/raw_convert.h
+++ b/src/raw_convert.h
@@ -30,11 +30,14 @@ namespace dcp {
*/
template <typename P, typename Q>
P
-raw_convert (Q v, int precision = 16)
+raw_convert (Q v, int precision = 16, bool fixed = false)
{
std::stringstream s;
s.imbue (std::locale::classic ());
s << std::setprecision (precision);
+ if (fixed) {
+ s << std::fixed;
+ }
s << v;
P r;
s >> r;