diff --git a/include/fmt/format.h b/include/fmt/format.h index 30c67941..20db4ce2 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -657,12 +657,6 @@ FMT_CONSTEXPR20 auto fill_n(T* out, Size count, char value) -> T* { return out + count; } -#ifdef __cpp_char8_t -using char8_type = char8_t; -#else -enum char8_type : unsigned char {}; -#endif - template FMT_CONSTEXPR FMT_NOINLINE auto copy_str_noinline(InputIt begin, InputIt end, OutputIt out) -> OutputIt { @@ -819,12 +813,6 @@ inline auto code_point_index(string_view s, size_t n) -> size_t { return result; } -inline auto code_point_index(basic_string_view s, size_t n) - -> size_t { - return code_point_index( - string_view(reinterpret_cast(s.data()), s.size()), n); -} - template struct is_integral : std::is_integral {}; template <> struct is_integral : std::true_type {}; template <> struct is_integral : std::true_type {}; diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 1e791bb0..04ba67db 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -20,6 +20,12 @@ FMT_BEGIN_NAMESPACE namespace detail { +#ifdef __cpp_char8_t +using char8_type = char8_t; +#else +enum char8_type : unsigned char {}; +#endif + template using is_exotic_char = bool_constant::value>;