mirror of
https://github.com/fmtlib/fmt.git
synced 2025-09-27 07:01:02 +02:00
Move is_*char to detail
This commit is contained in:
@@ -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
|
||||
|
@@ -607,19 +607,6 @@ template <typename Char> class basic_string_view {
|
||||
|
||||
using string_view = basic_string_view<char>;
|
||||
|
||||
// DEPRECATED! Will be merged with is_char and moved to detail.
|
||||
template <typename T> struct is_xchar : std::false_type {};
|
||||
template <> struct is_xchar<wchar_t> : std::true_type {};
|
||||
template <> struct is_xchar<char16_t> : std::true_type {};
|
||||
template <> struct is_xchar<char32_t> : std::true_type {};
|
||||
#ifdef __cpp_char8_t
|
||||
template <> struct is_xchar<char8_t> : std::true_type {};
|
||||
#endif
|
||||
|
||||
// Specifies if `T` is a character (code unit) type.
|
||||
template <typename T> struct is_char : is_xchar<T> {};
|
||||
template <> struct is_char<char> : std::true_type {};
|
||||
|
||||
template <typename T> class basic_appender;
|
||||
using appender = basic_appender<char>;
|
||||
|
||||
@@ -916,6 +903,20 @@ FMT_END_EXPORT
|
||||
|
||||
namespace detail {
|
||||
|
||||
// DEPRECATED! Will be merged with is_char
|
||||
template <typename T> struct is_xchar : std::false_type {};
|
||||
template <> struct is_xchar<wchar_t> : std::true_type {};
|
||||
template <> struct is_xchar<char16_t> : std::true_type {};
|
||||
template <> struct is_xchar<char32_t> : std::true_type {};
|
||||
#ifdef __cpp_char8_t
|
||||
template <>
|
||||
struct is_xchar<char8_t> : bool_constant<detail::is_utf8_enabled> {};
|
||||
#endif
|
||||
|
||||
// Specifies if `T` is a character (code unit) type.
|
||||
template <typename T> struct is_char : is_xchar<T> {};
|
||||
template <> struct is_char<char> : std::true_type {};
|
||||
|
||||
// Constructs fmt::basic_string_view<Char> from types implicitly convertible
|
||||
// to it, deducing Char. Explicitly convertible types such as the ones returned
|
||||
// from FMT_STRING are intentionally excluded.
|
||||
|
@@ -112,10 +112,6 @@ inline auto runtime(wstring_view s) -> runtime_format_string<wchar_t> {
|
||||
return {{s}};
|
||||
}
|
||||
|
||||
#ifdef __cpp_char8_t
|
||||
template <> struct is_char<char8_t> : bool_constant<detail::is_utf8_enabled> {};
|
||||
#endif
|
||||
|
||||
template <typename... T>
|
||||
constexpr auto make_wformat_args(T&... args)
|
||||
-> decltype(fmt::make_format_args<wformat_context>(args...)) {
|
||||
|
Reference in New Issue
Block a user