hash_multiset::hash_multiset

备注

此 API 已过时。替代为 unordered_multiset 类

构造一个hash_multiset 空字符串或是一些其它 hash_multiset的全部或者部分复制。

hash_multiset( );
explicit hash_multiset(
    const Traits& Comp
);
hash_multiset(
    const Traits& Comp,
    const Allocator& Al
);
hash_multiset(
    const hash_multiset<Key, Traits, Allocator>& Right
);
hash_multiset(
    hash_multiset&& Right
};
hash_multiset (
    initializer_list<Type> IList
);
hash_multiset(
     initializer_list<Tu[e> IList,
    const Compare& Comp
):
hash_multiset(
    initializer_list<Type> IList,
    const Compare& Comp,
    const Allocator& Al
);
template<class InputIterator>
    hash_multiset(
        InputIterator First,
        InputIterator Last
    );
template<class InputIterator>
    hash_multiset(
        InputIterator First,
        InputIterator Last,
        const Traits& Comp
    );
template<class InputIterator>
    hash_multiset(
        InputIterator First,
        InputIterator Last,
        const Traits& Comp,
        const Allocator& Al
    );

参数

参数

说明

Al

存储分配器类在hash_multiset 对象中使用,默认遵守Allocator

Comp

默认遵守hash_compare的类型const Traits的比较函数用来排序hash_multiset中的元素。

Right

hash_multiset将被构造为hash_multiset 的一个副本。

First

要复制的元素范围中的第一个元素的位置。

Last

要复制的元素范围之外的第一个元素的位置。

IList

initializer_list包含要复制的元素。

备注

所有构造函数存储了一个为hash_multiset管理内存存储的分配器对象的类型并且此对象能够通过调用hash_multiset::get_allocator返回。 分配器参数通常在所使用的类声明和用于替换分配器的预处理器宏被忽略。

所有构造函数初始化它们的 hash_multisets。

所有的构造函数存储了一个用来在hash_multiset关键值中建立排序的函数对象类型Traits,并且接下来可以通过调用 hash_multiset::key_comp返回。 有关Traits 的更多信息,请参见主题hash_multiset 类

第一个构造函数指定了空的初始hash_multiset, 第二个构造函数则指定了用来建立元素次序的比较函数 (Comp) 的类型,第三个构造函数则指定了使用的分配其类型(Al)。 关键字explicit抑制了一些种类的自动类型转换。

最后一个构造函数移动到hash_multiset到Right。

第五,第六和第七个构造函数使用 initializer_list。

最后三个构造函数复制了在类比较和分配器的比较函数类型中不断增长的明确性的hash_multiset的范围[First,Last) 。

在哈希设置容器中组件实际排序取决于哈希函数希表的当前范围,通常不能预测,因为它可以设置仅仅取决于排序函数的容器。

要求

Header: <hash_set>

**命名空间:**stdext

请参见

参考

hash_multiset 类

标准模板库