fix-ambigious-format.patch 1.1 KB

12345678910111213141516171819202122232425262728
  1. --- a/include/fmt/ranges.h (index)
  2. +++ b/include/fmt/ranges.h (working tree)
  3. @@ -487,21 +487,21 @@ auto write_range_entry(OutputIt out, basic_string_view<Char> str) -> OutputIt {
  4. default:
  5. if (is_utf8()) {
  6. if (escape.cp < 0x100) {
  7. - out = format_to(out, "\\x{:02x}", escape.cp);
  8. + out = fmt::format_to(out, "\\x{:02x}", escape.cp);
  9. continue;
  10. }
  11. if (escape.cp < 0x10000) {
  12. - out = format_to(out, "\\u{:04x}", escape.cp);
  13. + out = fmt::format_to(out, "\\u{:04x}", escape.cp);
  14. continue;
  15. }
  16. if (escape.cp < 0x110000) {
  17. - out = format_to(out, "\\U{:08x}", escape.cp);
  18. + out = fmt::format_to(out, "\\U{:08x}", escape.cp);
  19. continue;
  20. }
  21. }
  22. for (Char escape_char : basic_string_view<Char>(
  23. escape.begin, to_unsigned(escape.end - escape.begin))) {
  24. - out = format_to(
  25. + out = fmt::format_to(
  26. out, "\\x{:02x}",
  27. static_cast<typename std::make_unsigned<Char>::type>(escape_char));
  28. }