diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index fd92ad9c..2cd5d37f 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -15,9 +15,6 @@ # include # include # include -# ifdef __cpp_lib_ranges -# include -# endif #endif #include "format.h" @@ -622,15 +619,11 @@ struct formatter< range_format::debug_string>> { private: using range_type = detail::maybe_const_range; -#ifdef __cpp_lib_ranges using string_type = conditional_t< - std::is_constructible_v, - std::ranges::iterator_t, - std::ranges::sentinel_t>, - std::basic_string_view, std::basic_string>; -#else - using string_type = std::basic_string; -#endif + std::is_constructible, + decltype(detail::range_begin(R())), + decltype(detail::range_end(R()))>::value, + detail::std_string_view, std::basic_string>; formatter underlying_;