Move disable-FILE-sfinae to color.h
This commit is contained in:
parent
a690029d9c
commit
f7f0b0e995
@ -423,6 +423,15 @@ template <>
|
||||
inline void reset_color<wchar_t>(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::FILE *> : std::false_type {};
|
||||
template <>
|
||||
struct is_string<const std::FILE *> : std::false_type {};
|
||||
} // namespace internal
|
||||
|
||||
template <
|
||||
|
||||
@ -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.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user