std::flat_set::lower_bound(3)
π std::flat_set::lower_bound(3) β C++ Standard Libary manual page π
okay bestie, welcome to the C++ Standard Libary page for std::flat_set::lower_bound. This is the one where we find the first element that is not less than a key. Itβs giving C++23 energy, and yes, all four overloads below are (since C++23). π
πΈ NAME πΈ
std::flat_set::lower_bound - std::flat_set::lower_bound
π Synopsis π
iterator lower_bound( const Key& key ); (1) (since C++23)
const_iterator lower_bound( const Key& key ) const; (2) (since C++23)
template< class K > (3) (since C++23)
iterator lower_bound( const K& x );
template< class K > (4) (since C++23)
const_iterator lower_bound( const K& x ) const;
- 1,2) Returns an iterator pointing to the first element that is not less than (i.e. greater or equal to)
key. π«Ά - 3,4) Returns an iterator pointing to the first element that compares not less (i.e. greater or equal) 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 not less than key. If no such element is found, a past-the-end iterator (see end()) is returned. π that past-the-end case is the little heartbreak, but at least itβs documented.
β±οΈ Complexity β±οΈ
Logarithmic in the size of the container. β‘
π Example π
This section is incomplete.
Reason: no example. π«
π See also π
equal_rangeβ returns range of elements matching a specific key (public member function).upper_boundβ returns an iterator to the first element greater than the given key (public member function).
π·οΈ Category: π·οΈ
- Todo no example.
π source/version: http://cppreference.com Β· date: 2024.06.10 β thatβs the whole std::flat_set::lower_bound(3) page, bestie; go forth and lower_bound 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