From e98155a6fbc9eedcd82e79ecdf808cfa829f5d0f Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 26 Apr 2025 10:35:42 -0700 Subject: [PATCH] Remove redundant specializations --- include/fmt/base.h | 4 ++-- include/fmt/xchar.h | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/fmt/base.h b/include/fmt/base.h index abc6f2d2..39ef747c 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -617,7 +617,7 @@ template class basic_string_view { using string_view = basic_string_view; -/// Specifies if `T` is an extended character type. Can be specialized by users. +// DEPRECATED! Will be merged with is_char and moved to detail. template struct is_xchar : std::false_type {}; template <> struct is_xchar : std::true_type {}; template <> struct is_xchar : std::true_type {}; @@ -626,7 +626,7 @@ template <> struct is_xchar : std::true_type {}; template <> struct is_xchar : std::true_type {}; #endif -// DEPRECATED! Will be replaced with an alias to prevent specializations. +// Specifies if `T` is a character (code unit) type. template struct is_char : is_xchar {}; template <> struct is_char : std::true_type {}; diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index d9590109..90994fff 100644 --- a/include/fmt/xchar.h +++ b/include/fmt/xchar.h @@ -112,10 +112,6 @@ inline auto runtime(wstring_view s) -> runtime_format_string { return {{s}}; } -template <> struct is_char : std::true_type {}; -template <> struct is_char : std::true_type {}; -template <> struct is_char : std::true_type {}; - #ifdef __cpp_char8_t template <> struct is_char : bool_constant {}; #endif