From f5eb410c628f676c76509a8356a0db5c51c71f98 Mon Sep 17 00:00:00 2001 From: Alexandre Bossard Date: Mon, 4 Nov 2019 14:20:03 +0100 Subject: [PATCH] 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. --- include/fmt/ranges.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) 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