mirror of
https://github.com/ToruNiina/toml11.git
synced 2024-09-19 23:29:53 +00:00
fix: don't ignore std::setw(0)
This commit is contained in:
parent
32f1b2060a
commit
251e55da42
@ -484,10 +484,12 @@ template<typename charT, typename traits>
|
||||
std::basic_ostream<charT, traits>&
|
||||
operator<<(std::basic_ostream<charT, traits>& os, const value& v)
|
||||
{
|
||||
// get status of std::setw(). if the width is narrower than 5 chars, ignore.
|
||||
const auto w = os.width();
|
||||
const auto fprec = os.precision();
|
||||
os << visit(serializer((w > 5 ? w : 80), fprec, false), v);
|
||||
// get status of std::setw().
|
||||
const std::size_t w = os.width();
|
||||
const int fprec = os.precision();
|
||||
|
||||
// the root object can't be an inline table. so pass `false`.
|
||||
os << visit(serializer(w, fprec, false), v);
|
||||
return os;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user