object::find

Find an element with a specific key.

Synopsis

object::iterator
find(
    string_view key) noexcept; (1)

object::const_iterator
find(
    string_view key) const noexcept; (2)

Description

This function returns an iterator to the element matching key if it exists, otherwise returns end().

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.