mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Fix floating point precision on input.
This commit is contained in:
@@ -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());\
|
||||
}\
|
||||
|
Reference in New Issue
Block a user