[upstream_utils] Upgrade to fmt 12.1.0 (#8312)

This commit is contained in:
Tyler Veness
2025-11-01 16:19:37 -07:00
committed by GitHub
parent cb720048b8
commit bc44ced506
12 changed files with 191 additions and 120 deletions

View File

@@ -1594,8 +1594,13 @@ class get_locale {
public:
inline get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
if (localized)
::new (&locale_) std::locale(loc.template get<std::locale>());
if (!localized) return;
ignore_unused(loc);
::new (&locale_) std::locale(
#if FMT_USE_LOCALE
loc.template get<std::locale>()
#endif
);
}
inline ~get_locale() {
if (has_locale_) locale_.~locale();