std::set::lower_bound(3)
π¦ NAME π¦
Okay bestie, welcome to std::set::lower_bound(3) from the C++ Standard Libary manual β yes, that's the manual name as written in the header, iconic typo energy ππ
. The name is literally:
std::set::lower_bound - std::set::lower_bound
No cap, that's the whole NAME situation. π
π Synopsis π
Here's the synopsis, copied exactly because code is sacred, bestie:
iterator lower_bound( const Key& key ); (1)
const_iterator lower_bound( const Key& key ) const; (2)
template< class K > (3) (since C++14)
iterator lower_bound( const K& x );
template< class K > (4) (since C++14)
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-id Compare::is_transparent is valid and denotes a type. It allows calling this function without constructing an instance of Key. β¨
π Parameters π
keyβ key value to compare the elements toxβ 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. π«Ά
π Complexity π
Logarithmic in the size of the container.
β Notes β
The feature-test macro situation is giving:
- Feature-test macro:
__cpp_lib_generic_associative_lookup - Value:
201304L - Std:
(C++14) - Feature: Heterogeneous comparison lookup in associative containers; overloads (3,4)
π§ 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
Mwah π β source/version is cppreference.com, date/version 2024.06.10, and this was the std::set::lower_bound(3) page. Bye bestie, go slay those 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