std::flat_set::upper_bound(3)
π¦ std::flat_set::upper_bound(3) β C++ Standard Libary β¨
πΈ NAME
std::flat_set::upper_bound β yep, the name is literally std::flat_set::upper_bound, bestie. That's the whole NAME vibe π
π Synopsis
Okay so here's the exact signature lineup, no cap:
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;
- 1,2) Returns an iterator pointing to the first element that is greater than
key. - 3,4) Returns an iterator pointing to the first element that compares greater to the value
x. 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.
π 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. That's the whole return-value tea βπ
β Complexity
Logarithmic in the size of the container. Slay, logarithmic queen ππ₯
π Example
This section is incomplete. Reason: no example. Bestie, we're literally left on read by the example section π« π
π 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
Sign-off cuteness: fromhttp://cppreference.com, dated2024.06.10, pagestd::flat_set::upper_bound(3)β bye bestie, go slay your iterators πππ¦
π¦ 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