From a12f910efa5960267274ff015071c9eba6316469 Mon Sep 17 00:00:00 2001 From: Justin Riddell Date: Mon, 8 Jul 2024 00:05:34 +0100 Subject: [PATCH] Fix usage with std::generator Fixes #4053 --- include/fmt/ranges.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/ranges.h b/include/fmt/ranges.h index f387903cf6348..0d3dfbd8d3784 100644 --- a/include/fmt/ranges.h +++ b/include/fmt/ranges.h @@ -490,7 +490,7 @@ struct range_formatter< auto out = ctx.out(); auto it = detail::range_begin(range); auto end = detail::range_end(range); - if (is_debug) return write_debug_string(out, it, end); + if (is_debug) return write_debug_string(out, std::move(it), end); out = detail::copy(opening_bracket_, out); int i = 0;