Move esoteric char type support to format.h

This commit is contained in:
Victor Zverovich
2021-05-06 08:50:35 -07:00
parent 9ac088f376
commit 5238055f40
2 changed files with 10 additions and 9 deletions

View File

@@ -393,12 +393,6 @@ template <typename Char> constexpr bool is_unicode() {
return FMT_UNICODE || sizeof(Char) != 1 ||
(sizeof(micro) == 3 && micro[0] == 0xC2 && micro[1] == 0xB5);
}
#ifdef __cpp_char8_t
using char8_type = char8_t;
#else
enum char8_type : unsigned char {};
#endif
} // namespace detail
/**
@@ -507,9 +501,6 @@ using wstring_view = basic_string_view<wchar_t>;
template <typename T> struct is_char : std::false_type {};
template <> struct is_char<char> : std::true_type {};
template <> struct is_char<wchar_t> : std::true_type {};
template <> struct is_char<detail::char8_type> : std::true_type {};
template <> struct is_char<char16_t> : std::true_type {};
template <> struct is_char<char32_t> : std::true_type {};
/**
\rst