Skip to content

Commit

Permalink
Use numeric_limits::max_digits10.
Browse files Browse the repository at this point in the history
Fixes #158.
  • Loading branch information
jtv committed Feb 8, 2019
1 parent 89d6bcc commit 097a349
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
6.3.2
- Query numeric precision in a more sensible, standard way.
6.3.1
- Windows compile fix (CALLBACK is a macro there).
- Work around Visual Studio 2017 not supporting ISO 646.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.1
6.3.2
6 changes: 1 addition & 5 deletions src/strconv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ template<typename T> class dumb_stringstream : public std::stringstream
dumb_stringstream()
{
this->imbue(std::locale::classic());

// Kirit reports getting two more digits of precision than
// numeric_limits::digits10 would give him, so we try not to make him lose
// those last few bits.
this->precision(std::numeric_limits<T>::digits10 + 2);
this->precision(std::numeric_limits<T>::max_digits10);
}
};

Expand Down

0 comments on commit 097a349

Please sign in to comment.