std::flat_m...:upper_bound(3)
π std::flat_m...:upper_bound(3) π
okay bestie, welcome to the C++ Standard Libary page for std::flat_multimap::upper_bound β yes, that spelling is in the header, and we are keeping it π. This one is short, cute, and extremely βwhere does the first bigger-than-this element live?β energy. π¦
πΈ NAME πΈ
std::flat_multimap::upper_bound β std::flat_multimap::upper_bound
likeβ¦ the name is the name, and honestly? iconic. π
π Synopsis π
iterator upper_bound( const Key& key ); (1) (since C++23)
const_iterator upper_bound( const Key& key ) const; (2) (since C++23)
template< class K > (3) (since C++23)
iterator upper_bound( const K& x );
template< class K > (4) (since C++23)
const_iterator upper_bound( const K& x ) const;
So hereβs the vibe check, overload by overload:
- Overloads
1,2return an iterator pointing to the first element that is greater thankey. - Overloads
3,4return an iterator pointing to the first element that compares greater to the valuex. This overload participates in overload resolution only if the qualified-idCompare::is_transparentis valid and denotes a type. It allows calling this function without constructing an instance ofKey. π«Ά
no cap, that transparent-comparator bit is the little VIP pass that lets you search without making a Key first. β¨
π Parameters π
keyβ key value to compare the elements to.xβ alternative value that can be compared toKey.
π Return value π
Iterator pointing to the first element that is greater than key. If no such element is found, past-the-end (see end()) iterator is returned. π«‘
like, if thereβs no bigger one, you get the βend of the lineβ iterator, and that is very much its whole thing.
π₯ Complexity π₯
Logarithmic in the size of the container. periodt. π
π Example π
This section is incomplete.
Reason: no example.
not me staring at an empty example sectionβ¦ the audacity, honestly π
π¦ See also π¦
equal_rangeβ returns range of elements matching a specific key (public member function).lower_boundβ returns an iterator to the first element not less than the given key (public member function).
π·οΈ Category π·οΈ
- Todo no example
kisses bestie, this page is from http://cppreference.com, version 2024.06.10 β go find your first greater-than element and slay π
β¨π
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms