std::map::lower_bound(3)
πΈ NAME πΈ
okay so this page is std::map::lower_bound(3) from the C++ Standard Libary manual, and the NAME section is literally std::map::lower_bound - std::map::lower_bound (yes bestie, the circular icon behavior is real π
). We're finding the first element that's not less than a key, and it's giving exact iterator energy β¨.
β¨ Synopsis β¨
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) return an iterator pointing to the first element that is not less than (i.e. greater or equal to)
key. - (3), (4) return 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β the key value to compare the elements to.xβ an alternative value that can be compared toKey.
π₯ Return value π₯
An 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's the whole rule, no cap.</br>
π Complexity π
Logarithmic in the size of the container. So it's fast like a group-chat reply when someone says "bestie guess what" π .
π¦ Notes π¦
Feature-test macro vibes:
- 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
that's the whole lower_bound vibe, bestie π source: http://cppreference.com, version/date: 2024.06.10, page: std::map::lower_bound(3) π«Ά
π¦ 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