-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix usage with std::generator (#4057)
Fixes #4053
- Loading branch information
Showing
2 changed files
with
23 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
vitaut
Contributor
|
||
|
||
out = detail::copy<Char>(opening_bracket_, out); | ||
int i = 0; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Problem seems to be that in line 493 the iterator
it
is moved into the call ofwrite_debug_string
, but in line L500 the moved-from iterator is referred to. I think the additionalwrite_debug_string
call requiresit
to be copyable.