remove(Iterator, Iterator)

| Home | Libraries | People | FAQ | More

##### remove(Iterator, Iterator)

Remove a range of values from the container.

###### Description

In contrast to the ``std::set`` or ``std::map erase()`` method it doesn't take iterators pointing to values stored in this container. 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.

###### Synopsis

    template<typename Iterator>
    size_type remove(Iterator first, Iterator last)

###### Parameter(s)

Type | Name | Description
--- | --- | ---
`Iterator` | `first` | The beginning of the range of values.
`Iterator` | `last` | The end of the range of values.

###### Returns

The number of removed values.

###### Throws

- If Value copy constructor or copy assignment throws.
- If allocation throws or returns invalid value.

| 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.