...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Remove value corresponding to an object convertible to it or a range of values from the container.
In contrast to the
or std::set
method it removes values
equal to these passed as a range. Furthermore, this method removes only
one value for each one passed in the range, not all equal values.
std::map erase()
template<
typename ConvertibleOrRange
>
size_type
remove
(
ConvertibleOrRange const &
conv_or_rng
)
Type |
Name |
Description |
---|---|---|
|
|
The object of type convertible to value_type or a range of values. |
The number of removed values.
Warning | |
---|---|
This operation only guarantees that there will be no memory leaks. After an exception is thrown the R-tree may be left in an inconsistent state, elements must not be inserted or removed. Other operations are allowed however some of them may return invalid data. |