Library Version 11.2.5.3

lower_bound
Prev | Chapter 5. Db_map | Next

## lower_bound

### Function Details

    const_iterator lower_bound(const key_type &x) const

Find the greatest key less than or equal to x.

#### Parameters

##### x

The target key to find.

#### Return Value

The valid const iterator sitting on the key, or an invalid one.

#### See Also

http://www.cplusplus.com/reference/stl/map/lower_bound/

    iterator lower_bound(const key_type &x,
        bool readonly=false)

Find the greatest key less than or equal to x.

#### Parameters

##### x

The target key to find.

##### readonly

Whether the returned iterator is readonly.

#### Return Value

The valid iterator sitting on the key, or an invalid one.

#### See Also

http://www.cplusplus.com/reference/stl/map/lower_bound/

### Group: Searching Functions

The following functions are returning iterators, and they by default return read-write iterators.

If you intend to use the returned iterator only to read, you should call the const version of each function using a const reference to this container. Using const iterators can potentially promote concurrency a lot. You can also set the readonly parameter to each non-const version of the functions to true if you don't use the returned iterator to write, which also promotes concurrency and overall performance.

### Class

db_map

Prev | Up | Next
find | Home | equal_range