diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 6110fdaf..e84666fa 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -74,15 +74,8 @@ OutputIterator copy(char ch, OutputIterator out) { } /// Return true value if T has std::string interface, like std::string_view. -template class is_like_std_string { - template - static auto check(U* p) - -> decltype((void)p->find('a'), p->length(), (void)p->data(), int()); - template static void check(...); - - public: - static FMT_CONSTEXPR_DECL const bool value = - is_string::value || !std::is_void(nullptr))>::value; +template struct is_like_std_string { + static FMT_CONSTEXPR_DECL const bool value = is_string::value; }; template