Skip to content

Commit

Permalink
Added missing std::declval for non-default-constructible types
Browse files Browse the repository at this point in the history
  • Loading branch information
matt77hias committed Jun 17, 2024
1 parent c00149f commit bd94b30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/ranges.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,8 @@ struct formatter<
using range_type = detail::maybe_const_range<R>;
using string_type = conditional_t<
std::is_constructible<detail::std_string_view<Char>,
decltype(detail::range_begin(R())),
decltype(detail::range_end(R()))>::value,
decltype(detail::range_begin(std::declval<R>())),
decltype(detail::range_end(std::declval<R>()))>::value,
detail::std_string_view<Char>, std::basic_string<Char>>;

formatter<string_type, Char> underlying_;
Expand Down

0 comments on commit bd94b30

Please sign in to comment.