lower_bound [C++ Reference]
Keywords: stl,set,lower_bound
Date: 2009-11-02T07:55:16-0800

[[lower_bound]]
C++ Reference
Translations of this page?:

- en
- br-pt
- cn
- cz
- de
- es
- fr
- it
- jp
- nl
- pl
- ro
- ru
- sk
- tr
- tw

## lower_bound

Syntax:

        #include <set>
        iterator lower_bound( const key_type& key );
        const_iterator lower_bound( const key_type& key ) const;

The lower_bound method returns an iterator to the first element which has a value greater than or equal to `key`, i.e. the iterator to the first element `e` that returns `false` when the template parameter functor `Compare()(key, e)` is called.

lower_bound runs in logarithmic time.

Related Topics: upper_bound

Edit this page • Old revisions
• • • Login • Index • Recent changes • RSS • cc •