From f7f0b0e995dd22f1279b18a1a97a10b900473ba6 Mon Sep 17 00:00:00 2001 From: Nicolas Lesser Date: Sun, 9 Dec 2018 16:23:34 +0100 Subject: [PATCH] Move disable-FILE-sfinae to color.h --- include/fmt/color.h | 9 +++++++++ include/fmt/core.h | 5 ----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index 772fbe6b..c5e30168 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -423,6 +423,15 @@ template <> inline void reset_color(FILE *stream) FMT_NOEXCEPT { fputs(internal::data::WRESET_COLOR, stream); } + +// The following specialiazation disables using std::FILE as a character type, +// which is needed because or else +// fmt::print(stderr, fmt::emphasis::bold, ""); +// would take stderr (a std::FILE *) as the format string. +template <> +struct is_string : std::false_type {}; +template <> +struct is_string : std::false_type {}; } // namespace internal template < diff --git a/include/fmt/core.h b/include/fmt/core.h index 2572efbf..a867d8d7 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -508,11 +508,6 @@ namespace internal { struct dummy_string_view { typedef void char_type; }; dummy_string_view to_string_view(...); -// The following overload disables using std::FILE as a character type, which is -// needed because or else -// fmt::print(stderr, fmt::emphasis::bold, ""); -// would take stderr as the format string. -dummy_string_view to_string_view(const std::FILE *); using fmt::v5::to_string_view; // Specifies whether S is a string type convertible to fmt::basic_string_view.