You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, since I'm not an author of {fmt}, I don't know much about the implementation detail of the library. But I took a glance at the code and found that the example code shown in your link seems to use fallback_formatter that internally calls operator<<(ostream&, T). If I'm not mistaken, it does not set std::setw. Since operator<<(ostream&, toml::value) reads width setting in ostream, if width is not set, it does nothing.
There are several options:
implementing {fmt} formatter that parses width specifier and pass it to setw or toml::format. I think this is the most appropriate (but could be painful) way.
wrapping a toml::value by a struct that has width and define operator<< to use width internally. This is easy but makes code messy.
Problem Description
It is related to the issue: fmtlib/fmt#2894
According to vitaut's comment:
What should I do?
The text was updated successfully, but these errors were encountered: