| Home | Libraries | People | FAQ | More

###### object::stable_erase (2 of 2 overloads)

Erase an element preserving order.

###### Synopsis

    std::size_t
    stable_erase(
        string_view key);

###### Description

Remove the element which matches `key`, if it exists. All references and iterators are invalidated. The relative order of remaining elements is preserved.

###### Complexity

Linear in `size()`.

###### Exception Safety

No-throw guarantee.

###### Return Value

The number of elements removed, which will be either 0 or 1.

###### Parameters

Name | Description
--- | ---
`key` | The key to match.