命名空间
变体
操作

std::flat_multiset<Key,Compare,KeyContainer>::upper_bound

出自 cppreference.cn
 
 
 
 
iterator upper_bound( const Key& key );
(1) (自 C++23 起)
const_iterator upper_bound( const Key& key ) const;
(2) (自 C++23 起)
template< class K >
iterator upper_bound( const K& x );
(3) (自 C++23 起)
template< class K >
const_iterator upper_bound( const K& x ) const;
(4) (自 C++23 起)
1,2) 返回指向首个大于 key 的元素的迭代器。
3,4) 返回指向首个比较时大于x 的元素的迭代器。此重载仅在限定标识 Compare::is_transparent 有效并表示类型时才参与重载决议。它允许在不构造 Key 实例的情况下调用此函数。

目录

[编辑] 参数

key - 用于比较元素的键值
x - 可以与 Key 进行比较的备选值

[编辑] 返回值

迭代器,指向首个大于 key 的元素。若找不到这种元素,则返回尾后(参见 end())迭代器。

[编辑] 复杂度

容器大小的对数。

[编辑] 示例

[编辑] 参见

返回匹配特定键的元素的范围
(公开成员函数) [编辑]
返回指向首个不小于给定键的元素的迭代器
(公开成员函数) [编辑]