std::deque::clear
STD::DEQUE:清澈
void clear( | | |
---|
从容器中移除所有元素。
使引用、指针或迭代器引用包含的元素无效。任何过去的迭代器也是无效的.
参数
%280%29
返回值
%280%29
例外
(none) | (until C++11) |
---|---|
noexcept specification: noexcept | (since C++11) |
复杂性
容器的大小成线性。
缺陷报告
以下行为更改缺陷报告追溯应用于先前发布的C++标准。
DR | Applied to | Behavior as published | Correct behavior |
---|---|---|---|
LWG 2231 | C++11 | complexity guarantee was mistakenly omitted in C++11 | complexity reaffirmed as linear |
另见
erase | erases elements (public member function) |
---|
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。