Namespaces
Variants

std::flat_set<Key,Compare,KeyContainer>:: lower_bound

From cppreference.net

iterator lower_bound ( const Key & key ) ;
(1) (C++23以降)
(C++26以降 constexpr)
const_iterator lower_bound ( const Key & key ) const ;
(2) (C++23以降)
(C++26以降 constexpr)
template < class K >
iterator lower_bound ( const K & x ) ;
(3) (C++23以降)
(C++26以降 constexpr)
template < class K >
const_iterator lower_bound ( const K & x ) const ;
(4) (C++23以降)
(C++26以降 constexpr)
1,2) 最初の要素を指すイテレータを返します。その要素は 以上 key です。
3,4) 最初の要素を指すイテレータを返します。この要素は x よりも 小さくない 比較結果となるものです。
このオーバーロードは、 Compare transparent である場合にのみ、オーバーロード解決に参加します。これにより、 Key のインスタンスを構築せずにこの関数を呼び出すことが可能になります。

目次

パラメータ

key - 要素を比較するキー値
x - Key と比較可能な代替値

戻り値

指定されたキー以上である最初の要素を指すイテレータ、またはそのような要素が存在しない場合は end ( ) を返します。

計算量

コンテナのサイズに対して対数的。

関連項目

特定のキーに一致する要素の範囲を返す
(公開メンバ関数)
指定されたキーより 大きい 最初の要素へのイテレータを返す
(公開メンバ関数)