std::flat_set<Key,Compare,KeyContainer>::lower_bound
来自 cppreference.cn
iterator lower_bound( const Key& key ); |
(1) | (since C++23) |
const_iterator lower_bound( const Key& key ) const; |
(2) | (since C++23) |
template< class K > iterator lower_bound( const K& x ); |
(3) | (since C++23) |
template< class K > const_iterator lower_bound( const K& x ) const; |
(4) | (since C++23) |
1,2) 返回指向首个不小于(即大于或等于)key 的元素的迭代器。
3,4) 返回指向首个与值 x 比较为不小于(即大于或等于)的元素的迭代器。此重载仅当限定标识 Compare::is_transparent 合法且指代类型时才参与重载决议。它允许在不构造
Key
实例的情况下调用此函数。目录 |
[edit] 参数
key | - | 用于与元素比较的键值 |
x | - | 可以与 Key 比较的替代值 |
[edit] 返回值
指向首个不小于 key 的元素的迭代器。若未找到这种元素,则返回末尾后迭代器(见 end())。
[edit] 复杂度
容器大小的对数。
[edit] 示例
本节不完整 原因:没有示例 |
[edit] 参见
返回匹配特定键的元素范围 (公共成员函数) | |
返回指向首个大于给定键的元素的迭代器 (公共成员函数) |