Fix floating point precision on input.

This commit is contained in:
Jesse Beder
2013-04-13 13:10:36 -05:00
parent ae42def6cf
commit 895af26226
2 changed files with 10 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ namespace YAML
struct convert<type> {\
static Node encode(const type& rhs) {\
std::stringstream stream;\
stream.precision(std::numeric_limits<type>::digits10 + 1);\
stream << rhs;\
return Node(stream.str());\
}\