From 92551b1893d8fe0ff55cbce19094ae6dc6b6c2cd Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Mon, 17 Jun 2024 21:50:21 +0200 Subject: [PATCH] Added missing std::declval for non-default-constructible types --- 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 66329aae71ed..12dc8fa8e75f 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_;