From a690029d9cc86201a933ae7614fed42db9d31acf Mon Sep 17 00:00:00 2001 From: Nicolas Lesser Date: Sun, 9 Dec 2018 12:30:22 +0100 Subject: [PATCH] Add a brief comment explaining why the overload is needed. --- include/fmt/core.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/fmt/core.h b/include/fmt/core.h index 58c731f8..2572efbf 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -508,6 +508,10 @@ 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;