From e9d022169ec77edd0c5261b00697296ce5569503 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Sun, 18 Aug 2024 21:34:35 +0300 Subject: [PATCH] Fix iterator type mismatch in basic_string::erase functions --- include_std/string | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include_std/string b/include_std/string index 91585dda..1127f8c4 100644 --- a/include_std/string +++ b/include_std/string @@ -1515,14 +1515,14 @@ namespace std constexpr iterator erase(const_iterator position) { - size_type index = position - begin(); + size_type index = position - cbegin(); erase(index, 1); return begin() + index; } constexpr iterator erase(const_iterator first, const_iterator last) { - size_type index = first - begin(); + size_type index = first - cbegin(); erase(index, last - first); return begin() + index; }