Skip to content

Commit

Permalink
Use std::default_sentinel instead of `std::istreambuf_iterator<char…
Browse files Browse the repository at this point in the history
…>()`
  • Loading branch information
davidstone committed Dec 18, 2023
1 parent d2070f6 commit e39a1b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/containers/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export struct string : private small_buffer_optimized_vector<char, 0> {
auto const width = stream.width();
auto const max_characters = width <= 0 ? max_width : bounded::clamp(bounded::integer(width), 1_bi, max_width);
containers::clear(str);
for (auto it = std::istreambuf_iterator<char>(stream); it != std::istreambuf_iterator<char>(); ++it) {
for (auto it = std::istreambuf_iterator<char>(stream); it != std::default_sentinel; ++it) {
if (containers::size(str) == max_characters) {
break;
}
Expand Down

0 comments on commit e39a1b8

Please sign in to comment.