Skip to content

Commit

Permalink
Remove a redundant function
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Jan 4, 2024
1 parent bee495c commit 06de1b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
12 changes: 0 additions & 12 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename OutChar, typename InputIt, typename OutputIt>
FMT_CONSTEXPR FMT_NOINLINE auto copy_str_noinline(InputIt begin, InputIt end,
OutputIt out) -> OutputIt {
Expand Down Expand Up @@ -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<char8_type> s, size_t n)
-> size_t {
return code_point_index(
string_view(reinterpret_cast<const char*>(s.data()), s.size()), n);
}

template <typename T> struct is_integral : std::is_integral<T> {};
template <> struct is_integral<int128_opt> : std::true_type {};
template <> struct is_integral<uint128_t> : std::true_type {};
Expand Down
6 changes: 6 additions & 0 deletions include/fmt/xchar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <typename T>
using is_exotic_char = bool_constant<!std::is_same<T, char>::value>;

Expand Down

0 comments on commit 06de1b0

Please sign in to comment.