Fix ambiguity for types with dodgy conversions

This commit is contained in:
Victor Zverovich
2019-09-28 09:13:32 -07:00
parent b4f1988c4b
commit 0fc7bd1573
2 changed files with 19 additions and 5 deletions

View File

@@ -246,7 +246,8 @@ template <typename T, typename Char> struct is_range {
static FMT_CONSTEXPR_DECL const bool value =
internal::is_range_<T>::value &&
!internal::is_like_std_string<T>::value &&
!std::is_convertible<T, std::basic_string<Char>>::value;
!std::is_convertible<T, std::basic_string<Char>>::value &&
!std::is_constructible<internal::std_string_view<Char>, T>::value;
};
template <typename RangeT, typename Char>