Victor Zverovich
Victor Zverovich
Good catch, thanks. We should make the diagnostic consistent but in the meantime you can use manual indexing as a workaround: ``` fmt::print("{0} {a}", 1, "a"_a = 2); ```
A PR to add a formatter for `utc_clock` is welcome.
In general sounds reasonable. I would suggest splitting this into multiple PRs, first to add the formatter specialization, then adding nanosecond support.
Closing since `utc_clock` is now supported (thanks) and accuracy is tracked in #2207.
You could use `fmt::vformat_to` which is a trivial wrapper around `fmt::detail::vformat_to`: https://github.com/fmtlib/fmt/blob/21c2137e77a41a0b815c3735ce971e7af7cb0c21/include/fmt/core.h#L3224-L3231 If there is still perf difference, I'd be happy to look at the benchmark and see how it...
Using `fmt::appender` instead of `std::back_inserter` should resolve perf difference without the need for internal API: https://godbolt.org/z/KGWj4GMe3. I'll add the same optimization for `std::back_insert_iterator`.
BTW handling of `back_insert_iterator` has been optimized in https://github.com/fmtlib/fmt/commit/192859c2b5dda3a015a7b1bf023f0c2475f0350c so using internal APIs shouldn't be needed anymore.
Thanks, @patrickroocks.
I don't think this warrants making a new release but you can pin to a specific commit where this feature is implemented.
Closing as I wasn't able to reproduce the issue in the described configuration. Feel free to reopen with more repro details.