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
It would be nice if it were possible to print the help text without passing by std::ostream, e.g. I'm migrating existing code to fmt, but still have to use either std::cerr or std::ostrstream to be able to print help message and I'd rather avoid it.
The simplest fix would seem to be to refactor parser::print_help_text() to use get_help_text() returning a std::string, as this function doesn't really use any of the streams functionality and does formatting manually anyhow. As usual, I could make a PR if this could be useful -- please let me know.
Note that while this is somewhat related to #46, but not really the same thing.
The text was updated successfully, but these errors were encountered:
I would benefit. I've been taking the default help text and passing it through a "transformation filter" that modifies the formatting into a structure that the default help text cannot emit. The need to go through an iostream is an annoyance. The proposed change would simplify my post-processing.
It would be nice if it were possible to print the help text without passing by
std::ostream
, e.g. I'm migrating existing code tofmt
, but still have to use eitherstd::cerr
orstd::ostrstream
to be able to print help message and I'd rather avoid it.The simplest fix would seem to be to refactor
parser::print_help_text()
to useget_help_text()
returning astd::string
, as this function doesn't really use any of the streams functionality and does formatting manually anyhow. As usual, I could make a PR if this could be useful -- please let me know.Note that while this is somewhat related to #46, but not really the same thing.
The text was updated successfully, but these errors were encountered: