Remove string like api detection for ranges

This isn't very useful nor very valid. And since
it trigger a GCC 4.8 bug, it's easier to drop it.
This commit is contained in:
Alexandre Bossard 2019-11-04 14:20:03 +01:00
parent 8b52d33b69
commit f5eb410c62
No known key found for this signature in database
GPG Key ID: DF599C202481B00F

View File

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