✏️ fix typo

This commit is contained in:
Niels Lohmann 2021-11-09 17:31:35 +01:00
parent d2ddce0a37
commit 80067d96ff
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
2 changed files with 6 additions and 6 deletions

View File

@ -112,8 +112,8 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
iterator erase(iterator first, iterator last)
{
const auto offset = std::distance(Container::begin(), first);
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
@ -153,8 +153,8 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator got invalidated by the resize call. Instead, we
// can return begin() + offset.
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
}

View File

@ -17499,8 +17499,8 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
iterator erase(iterator first, iterator last)
{
const auto offset = std::distance(Container::begin(), first);
const auto elements_affected = std::distance(first, last);
const auto offset = std::distance(Container::begin(), first);
// This is the start situation. We need to delete elements_affected
// elements (3 in this example: e, f, g), and need to return an
@ -17540,8 +17540,8 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
// first last
// first is now pointing past the last deleted element, but we cannot
// use this iterator got invalidated by the resize call. Instead, we
// can return begin() + offset.
// use this iterator, because it may have been invalidated by the
// resize call. Instead, we can return begin() + offset.
return Container::begin() + offset;
}