Make locales work with any character type

This commit is contained in:
Victor Zverovich
2018-10-28 09:03:27 -07:00
parent bdda4d6030
commit 324eac1aa5
3 changed files with 16 additions and 10 deletions
+1 -4
View File
@@ -214,13 +214,10 @@ class locale {
namespace internal {
template <typename Char>
FMT_FUNC Char thousands_sep(locale_provider *lp) {
FMT_FUNC Char thousands_sep_impl(locale_provider *lp) {
std::locale loc = lp ? lp->locale().get() : std::locale();
return std::use_facet<std::numpunct<Char>>(loc).thousands_sep();
}
template <> FMT_FUNC char8_t thousands_sep<char8_t>(locale_provider *) {
return static_cast<char8_t>(',');
}
}
#else
template <typename Char>