-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fmt/color.h missing format_to overload #1593
Comments
It was proposed before (#1161) but noone was interested enough in implementing it probably because there is little value in optimizing allocations when you are dealing with I/O. |
PRs are welcome =). |
I see, I missed that ticket when searching. It would be nice for completeness to have it, but I agree that colors are mostly used when printing to a tty, in which case I doubt the extra strings matter much, at least they do not for my use case. Closing, I will let a future brave soul do it. Thank you |
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Rewrite the color unit tests to test the same colors against multiple backends * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
* Fix variable size basic_memory_buffer colorization * Fix an unused arguments warning on GCC that blocks the CI otherwise * Ref fmtlib#1842 * Ref fmtlib#1593
Hello,
I was wondering if there was any reason for fmt/color.h to not provide a format_to() overload?
I'd like to print messages to stderr using a style similar to GCC/Clang:
However, due to multiprocessing issues, I'd like to write the messages "atomically" to stderr so output does not get mixed up.
Right now I can do it that way:
But it bothers me to allocate so many
std::string
, a color-supportingformat_to()
would be an improvement.The text was updated successfully, but these errors were encountered: