From 4a4a2a2bd6a712a1250a0777e74b0261f003043b Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sun, 9 Apr 2023 09:25:15 -0700 Subject: [PATCH] Fix diagnostics --- include/fmt/core.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 738b85df..afb43d2c 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -516,7 +516,6 @@ struct compile_string {}; template struct is_compile_string : std::is_base_of {}; -// Returns a string view of `s`. template ::value)> FMT_INLINE auto to_string_view(const Char* s) -> basic_string_view { return s; @@ -1209,7 +1208,6 @@ constexpr auto count_statically_named_args() -> size_t { struct unformattable {}; struct unformattable_char : unformattable {}; -struct unformattable_const : unformattable {}; struct unformattable_pointer : unformattable {}; template struct string_value { @@ -1287,7 +1285,6 @@ template class value { } value(unformattable); value(unformattable_char); - value(unformattable_const); value(unformattable_pointer); private: @@ -1449,7 +1446,7 @@ template struct arg_mapper { return val; } template ::value)> - FMT_CONSTEXPR FMT_INLINE auto do_map(T&&) -> unformattable_const { + FMT_CONSTEXPR FMT_INLINE auto do_map(T&&) -> unformattable { return {}; } @@ -1680,10 +1677,6 @@ FMT_CONSTEXPR FMT_INLINE auto make_value(T&& val) -> value { !std::is_same::value; static_assert(formattable_char, "Mixing character types is disallowed."); - constexpr bool formattable_const = - !std::is_same::value; - static_assert(formattable_const, "Cannot format a const argument."); - // Formatting of arbitrary pointers is disallowed. If you want to format a // pointer cast it to `void*` or `const void*`. In particular, this forbids // formatting of `[const] volatile char*` printed as bool by iostreams.