From e0b66e8f83bbfd3c348b5c0c388a176a972535ab Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 13 Jun 2024 15:50:40 -0700 Subject: [PATCH] Remove dependency on --- include/fmt/ranges.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) 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_;