hash_multiset::lower_bound (STL/CLR)

查找与指定的键范围的开头。

    iterator lower_bound(key_type key);

参数


  • 搜索的键值。

备注

成员函数确定在哈希到存储桶和 key 相同具有相同顺序对 key的控件序列的第一个元素 X 。如果该元素不存在,则返回 hash_multiset::end (STL/CLR)();否则返回指定 X的迭代器。使用该当前所位于的元素序列的开头与指定的键控件序列。

示例

// cliext_hash_multiset_lower_bound.cpp 
// compile with: /clr 
#include <cliext/hash_set> 
 
typedef cliext::hash_multiset<wchar_t> Myhash_multiset; 
int main() 
    { 
    Myhash_multiset c1; 
    c1.insert(L'a'); 
    c1.insert(L'b'); 
    c1.insert(L'c'); 
 
// display initial contents " a b c" 
    for each (wchar_t elem in c1) 
        System::Console::Write(" {0}", elem); 
    System::Console::WriteLine(); 
 
    System::Console::WriteLine("lower_bound(L'x')==end() = {0}", 
        c1.lower_bound(L'x') == c1.end()); 
 
    System::Console::WriteLine("*lower_bound(L'a') = {0}", 
        *c1.lower_bound(L'a')); 
    System::Console::WriteLine("*lower_bound(L'b') = {0}", 
        *c1.lower_bound(L'b')); 
    return (0); 
    } 
 
  

要求

标题: <cliext/hash_set>

命名空间: cliext

请参见

参考

hash_multiset (STL/CLR)

hash_multiset::count (STL/CLR)

hash_multiset::equal_range (STL/CLR)

hash_multiset::find (STL/CLR)

hash_multiset::upper_bound (STL/CLR)