mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-25 11:49:52 +01:00
Workaround ABI incompatibility between clang ang gcc
This commit is contained in:
@@ -924,7 +924,10 @@ class locale_ref {
|
|||||||
constexpr locale_ref() : locale_(nullptr) {}
|
constexpr locale_ref() : locale_(nullptr) {}
|
||||||
|
|
||||||
template <typename Locale, FMT_ENABLE_IF(sizeof(Locale::collate) != 0)>
|
template <typename Locale, FMT_ENABLE_IF(sizeof(Locale::collate) != 0)>
|
||||||
locale_ref(const Locale& loc);
|
locale_ref(const Locale& loc) : locale_(&loc) {
|
||||||
|
// Check if std::isalpha is found via ADL to reduce the chance of misuse.
|
||||||
|
isalpha('x', loc);
|
||||||
|
}
|
||||||
|
|
||||||
inline explicit operator bool() const noexcept { return locale_ != nullptr; }
|
inline explicit operator bool() const noexcept { return locale_ != nullptr; }
|
||||||
#endif // FMT_USE_LOCALE
|
#endif // FMT_USE_LOCALE
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
FMT_BEGIN_NAMESPACE
|
FMT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
#if FMT_USE_LOCALE
|
#if FMT_USE_LOCALE
|
||||||
template FMT_API locale_ref::locale_ref(const std::locale& loc);
|
template FMT_API locale_ref::locale_ref(const std::locale& loc); // DEPRECATED!
|
||||||
template FMT_API auto locale_ref::get<std::locale>() const -> std::locale;
|
template FMT_API auto locale_ref::get<std::locale>() const -> std::locale;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user