From 2dd0a78c5224ed87bfdc749e5c8d456116c2eb27 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Sat, 16 Feb 2019 23:55:19 +0900 Subject: [PATCH] fix: reset stream width before printing without this, the first line of the serialized result becomes too wide --- toml/serializer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml/serializer.hpp b/toml/serializer.hpp index 1944ead..cb150bb 100644 --- a/toml/serializer.hpp +++ b/toml/serializer.hpp @@ -501,7 +501,7 @@ operator<<(std::basic_ostream& os, const value& v) // get status of std::setw(). const std::size_t w = os.width(); const int fprec = os.precision(); - + os.width(0); // the root object can't be an inline table. so pass `false`. os << visit(serializer(w, fprec, false), v); return os;