object::count

## `object::count`

Count the number of elements with a specific key.

### Synopsis

    std::size_t
    count(
        string_view key) const noexcept;

### Description

Returns the number of elements with keys equal to `key`. The only possible return values are 0 and 1.

### Complexity

Constant on average, worst case linear in `size()`.

### Exception Safety

No-throw guarantee.

### Parameters

Name | Description
--- | ---
`key` | The key of the element to find.

Edit this page