From 5c462d1817bdbeca9c42d47b866617f5305ce287 Mon Sep 17 00:00:00 2001 From: Xie Xie Date: Tue, 3 May 2022 13:44:16 +0800 Subject: [PATCH] Update sorted_vector_with_large_capacity.h --- second-edition/src/sorted_vector_with_large_capacity.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/second-edition/src/sorted_vector_with_large_capacity.h b/second-edition/src/sorted_vector_with_large_capacity.h index 7e87a6f..03fba66 100644 --- a/second-edition/src/sorted_vector_with_large_capacity.h +++ b/second-edition/src/sorted_vector_with_large_capacity.h @@ -55,7 +55,7 @@ template void sorted_vector_with_large_capacity:: erase(size_t pos) { - // 注意执行erase的前提是size() > 0. 另外, 也可使用向量的erase操作. + // 执行erase的前提是pos位置有元素可删. 另外, 也可使用向量的erase操作. for (size_t i = pos + 1; i < data.size(); ++i) data[i - 1] = data[i]; // 也可使用移动语义. data.pop_back();