Add support for more formattable types in ranges

This commit is contained in:
Victor Zverovich
2021-08-08 09:36:56 -07:00
parent 4fd9a00f35
commit 60cd5ea3f2
3 changed files with 16 additions and 8 deletions

View File

@@ -582,9 +582,9 @@ struct formatter<
T, Char,
enable_if_t<
fmt::is_range<T, Char>::value
// Workaround a bug in MSVC 2017 and earlier.
#if !FMT_MSC_VER || FMT_MSC_VER >= 1927
&& (has_formatter<detail::value_type<T>, format_context>::value ||
// Workaround a bug in MSVC 2019 and earlier.
#if !FMT_MSC_VER
&& (is_formattable<detail::value_type<T>, Char>::value ||
detail::has_fallback_formatter<detail::value_type<T>, Char>::value)
#endif
>> {