Skip to content

Commit a2826e8

Browse files
SGSSGenejbeder
authored andcommitted
fix: unittests sets locale before testing
the convert_with_stringstream seems to be missing a .imbue() call to set the locale independent of the global state. Not setting this, can in some settings lead to errors, see Issue #1366.
1 parent bbf8bdb commit a2826e8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

test/fptostring_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace {
1010
template <typename T>
1111
static std::string convert_with_stringstream(T v, size_t precision = 0) {
1212
std::stringstream ss;
13+
ss.imbue(std::locale::classic());
1314
if (precision > 0) {
1415
ss << std::setprecision(precision);
1516
}

0 commit comments

Comments
 (0)