mirror of
https://github.com/fmtlib/fmt.git
synced 2025-04-01 10:20:59 +00:00
Fix undefined reference when compiling with FMT_STATIC_THOUSANDS_SEPARATOR and chrono.h
This commit is contained in:
parent
6abc1204f3
commit
94f96d112d
@ -1780,8 +1780,10 @@ class get_locale {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
|
get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
|
||||||
|
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
||||||
if (localized)
|
if (localized)
|
||||||
::new (&locale_) std::locale(loc.template get<std::locale>());
|
::new (&locale_) std::locale(loc.template get<std::locale>());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
~get_locale() {
|
~get_locale() {
|
||||||
if (has_locale_) locale_.~locale();
|
if (has_locale_) locale_.~locale();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user