Skip to content

Commit 34d1455

Browse files
authored
Merge pull request #112 from georgthegreat/patch-1
Improve compatibility with various STL flavors
2 parents 93bcee2 + c8fa0c1 commit 34d1455

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/protozero/buffer_string.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ struct buffer_customization<std::string> {
5757
protozero_assert(from <= buffer->size());
5858
protozero_assert(to <= buffer->size());
5959
protozero_assert(from <= to);
60-
buffer->erase(std::next(buffer->begin(), static_cast<std::string::iterator::difference_type>(from)),
61-
std::next(buffer->begin(), static_cast<std::string::iterator::difference_type>(to)));
60+
buffer->erase(buffer->begin() + from,
61+
buffer->begin() + to);
6262
}
6363

6464
static char* at_pos(std::string* buffer, std::size_t pos) {

0 commit comments

Comments
 (0)