...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Erase an element.
std::size_t
erase(string_view
key) noexcept;
Remove the element which matches key
,
if it exists. References and iterators to the erased element are invalidated.
Other iterators and references are not invalidated.
Constant on average, worst case linear in size()
.
No-throw guarantee.
The number of elements removed, which will be either 0 or 1.
Name |
Description |
---|---|
|
The key to match. |