From 06de1b03f723af8aa399720b71343c68a8df5ac1 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 4 Jan 2024 15:51:28 -0800 Subject: [PATCH] Remove a redundant function --- include/fmt/format.h | 12 ------------ include/fmt/xchar.h | 6 ++++++ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 30c6794184747..20db4ce2337c3 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 1e791bb07b654..04ba67db08105 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>;