File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -1710,8 +1710,8 @@ decimal<Prec, RoundPolicy> decimal_cast(const char (&arg)[N]) {
17101710 output << " -" ;
17111711 }
17121712
1713+ std::locale oldloc = output.getloc ();
17131714 if (format.thousands_grouping () && format.change_thousands_if_needed ()) {
1714- std::locale oldloc = output.getloc ();
17151715 output.imbue ( std::locale ( std::locale::classic (), new decimal_format_punct (format) ) );
17161716 output << before;
17171717 output.imbue (oldloc);
@@ -1720,9 +1720,11 @@ decimal<Prec, RoundPolicy> decimal_cast(const char (&arg)[N]) {
17201720 }
17211721
17221722 if (arg.getDecimalPoints () > 0 ) {
1723+ output.imbue (std::locale::classic ());
17231724 output << format.decimal_point ();
17241725 output << setw (arg.getDecimalPoints ()) << setfill (' 0' ) << right
17251726 << after;
1727+ output.imbue (oldloc);
17261728 }
17271729 }
17281730
You can’t perform that action at this time.
0 commit comments