# std::multiset<Key,Compare,Allocator>::find

< cpp‎ | container‎ | multiset

C++
 Compiler support Freestanding and hosted Language Standard library headers Named requirements Feature test macros (C++20) Language support library Concepts library (C++20) Metaprogramming library (C++11) Diagnostics library General utilities library Strings library Containers library Iterators library Ranges library (C++20) Algorithms library Numerics library Localizations library Input/output library Filesystem library (C++17) Regular expressions library (C++11) Concurrency support library (C++11) Technical specifications Symbols index External libraries

Containers library
 Sequence array(C++11) vector deque forward_list(C++11) list Associative set multiset map multimap Unordered associative unordered_set(C++11) unordered_multiset(C++11) unordered_map(C++11) unordered_multimap(C++11) Adaptors stack queue priority_queue Views span(C++20)

std::multiset
 Member functions multiset::multiset multiset::~multiset multiset::operator= multiset::get_allocator Iterators multiset::endmultiset::cend(C++11) Capacity multiset::empty multiset::size multiset::max_size Modifiers multiset::clear multiset::insert multiset::emplace(C++11) multiset::emplace_hint(C++11) multiset::erase multiset::swap multiset::extract(C++17) multiset::merge(C++17) Lookup multiset::count multiset::find multiset::contains(C++20) multiset::equal_range multiset::lower_bound multiset::upper_bound Observers multiset::key_comp multiset::value_comp Non-member functions std::swap erase_if(C++20) operator==operator!=operatoroperator<=operator>=operator<=>(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20) Deduction guides(C++17)

 iterator find( const Key& key ); (1) const_iterator find( const Key& key ) const; (2) template< class K > iterator find( const K& x ); (3) (since C++14) template< class K > const_iterator find( const K& x ) const; (4) (since C++14)
1,2) Finds an element with key equivalent to key.
3,4) Finds an element with key that compares equivalent to the value x. This overload participates in overload resolution only if the qualified-id Compare::is_transparent is valid and denotes a type. It allows calling this function without constructing an instance of Key.

## Contents

### Parameters

 key - key value of the element to search for x - a value of any type that can be transparently compared with a key

### Return value

Iterator to an element with key equivalent to key. If no such element is found, past-the-end (see end()) iterator is returned.

### Complexity

Logarithmic in the size of the container.
{"ft_lang_label":"__label__en","ft_lang_prob":0.5345783,"math_prob":0.8955625,"size":2383,"snap":"2022-27-2022-33","text_gpt3_token_len":657,"char_repetition_ratio":0.11349306,"word_repetition_ratio":0.07368421,"special_character_ratio":0.31808645,"punctuation_ratio":0.20568928,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97300655,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-07-04T21:56:02Z\",\"WARC-Record-ID\":\"<urn:uuid:ed92e76c-124e-40d8-9947-b89e05f140ae>\",\"Content-Length\":\"56263\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9c7c0783-e9ce-4001-98e3-951b0d16e1d9>\",\"WARC-Concurrent-To\":\"<urn:uuid:2d30a01e-8c1d-4d34-ba53-5bddd0eb8b9f>\",\"WARC-IP-Address\":\"74.114.90.46\",\"WARC-Target-URI\":\"https://en.cppreference.com/w/cpp/container/multiset/find\",\"WARC-Payload-Digest\":\"sha1:GPHPRPTT5QGCPEF6BVXHTNXJBCXCRUKM\",\"WARC-Block-Digest\":\"sha1:ROFXOK336SVIFEXGTQU2SOLQKVYQLYWP\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656104496688.78_warc_CC-MAIN-20220704202455-20220704232455-00078.warc.gz\"}"}