diff --git a/doc/api.md b/doc/api.md index 61e5c3de..b6742a6c 100644 --- a/doc/api.md +++ b/doc/api.md @@ -653,8 +653,6 @@ if an argument type doesn't match its format specification. The optional header `fmt/xchar.h` provides support for `wchar_t` and exotic character types. -::: is_char - ::: wstring_view ::: wformat_context diff --git a/include/fmt/base.h b/include/fmt/base.h index bd2e13c3..a97c298a 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -607,19 +607,6 @@ template class basic_string_view { using string_view = basic_string_view; -// 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 {}; -template <> struct is_xchar : std::true_type {}; -#ifdef __cpp_char8_t -template <> struct is_xchar : std::true_type {}; -#endif - -// Specifies if `T` is a character (code unit) type. -template struct is_char : is_xchar {}; -template <> struct is_char : std::true_type {}; - template class basic_appender; using appender = basic_appender; @@ -916,6 +903,20 @@ FMT_END_EXPORT namespace detail { +// DEPRECATED! Will be merged with is_char +template struct is_xchar : std::false_type {}; +template <> struct is_xchar : std::true_type {}; +template <> struct is_xchar : std::true_type {}; +template <> struct is_xchar : std::true_type {}; +#ifdef __cpp_char8_t +template <> +struct is_xchar : bool_constant {}; +#endif + +// Specifies if `T` is a character (code unit) type. +template struct is_char : is_xchar {}; +template <> struct is_char : std::true_type {}; + // Constructs fmt::basic_string_view from types implicitly convertible // to it, deducing Char. Explicitly convertible types such as the ones returned // from FMT_STRING are intentionally excluded. diff --git a/include/fmt/xchar.h b/include/fmt/xchar.h index 598fea75..c0240a3e 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}}; } -#ifdef __cpp_char8_t -template <> struct is_char : bool_constant {}; -#endif - template constexpr auto make_wformat_args(T&... args) -> decltype(fmt::make_format_args(args...)) {