From ac9677323057b1ca31d157294b15ad0a74ae2b79 Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Tue, 18 Jun 2024 20:27:40 +0200 Subject: [PATCH] Added missing std::declval for non-default-constructible types (#4024) --- include/fmt/ranges.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index 66329aae..12dc8fa8 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -619,11 +619,12 @@ struct formatter< range_format::debug_string>> { private: using range_type = detail::maybe_const_range; - using string_type = conditional_t< - std::is_constructible, - decltype(detail::range_begin(R())), - decltype(detail::range_end(R()))>::value, - detail::std_string_view, std::basic_string>; + using string_type = + conditional_t, + decltype(detail::range_begin(std::declval())), + decltype(detail::range_end(std::declval()))>::value, + detail::std_string_view, std::basic_string>; formatter underlying_;