File 0001-Fix-handling-of-static-separator.patch of Package fmt

From ad9ba5aa82d2b1e232c71203de165fa61ce02d4c Mon Sep 17 00:00:00 2001
From: Victor Zverovich <viz@meta.com>
Date: Fri, 9 Feb 2024 15:58:56 -0800
Subject: [PATCH] Fix handling of static separator

---
 include/fmt/format-inl.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/fmt/format-inl.h b/include/fmt/format-inl.h
index efac5d1f..78c52ce8 100644
--- a/include/fmt/format-inl.h
+++ b/include/fmt/format-inl.h
@@ -114,7 +114,11 @@ template <typename Char> FMT_FUNC Char decimal_point_impl(locale_ref) {
 
 FMT_FUNC auto write_loc(appender out, loc_value value,
                         const format_specs<>& specs, locale_ref loc) -> bool {
-#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
+#ifdef FMT_STATIC_THOUSANDS_SEPARATOR
+  value.visit(loc_writer<>{
+      out, specs, std::string(1, FMT_STATIC_THOUSANDS_SEPARATOR), "\3", "."});
+  return true;
+#else
   auto locale = loc.get<std::locale>();
   // We cannot use the num_put<char> facet because it may produce output in
   // a wrong encoding.
@@ -123,7 +127,6 @@ FMT_FUNC auto write_loc(appender out, loc_value value,
     return std::use_facet<facet>(locale).put(out, value, specs);
   return facet(locale).put(out, value, specs);
 #endif
-  return false;
 }
 }  // namespace detail
 
-- 
2.44.0

openSUSE Build Service is sponsored by