-
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
problems using FMT_COMPILE with fmt::memory_buffer #1771
Comments
#include <fmt/compile.h>
int main() {
std::string s = "foo";
fmt::memory_buffer buf;
fmt::format_to(std::back_inserter(buf), FMT_COMPILE("{}"), s);
} |
Ok, thanks. Are there plans to support this in a future release? |
Yes |
@vitaut is using format_to with std::back_inserter and FMT_COMPILE faster than using format_to without std::back_inserter and without FMT_COMPILE? I have found in tests that its faster with std::back_inserter, its like the FMT_COMPILE compensates the std::back_inserter "overhead"(as far i understood, it insert byte per byte in the buffer). I asked here to prevent a new issue creation. |
|
It seems like the
FMT_COMPILE
macro doesn't work withfmt::memory_buffer
. Here's an example: https://godbolt.org/z/c4qd38Separately, I'm also getting a different compilation error when passing a string literal as one of the arguments (see https://godbolt.org/z/z1ofqv). Maybe there's something I'm missing here?
The text was updated successfully, but these errors were encountered: