mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 12:20:06 +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:
|
||||
get_locale(bool localized, locale_ref loc) : has_locale_(localized) {
|
||||
#ifndef FMT_STATIC_THOUSANDS_SEPARATOR
|
||||
if (localized)
|
||||
::new (&locale_) std::locale(loc.template get<std::locale>());
|
||||
#endif
|
||||
}
|
||||
~get_locale() {
|
||||
if (has_locale_) locale_.~locale();
|
||||
|
Loading…
Reference in New Issue
Block a user