std::unordered_set::unordered_set

来自cppreference.com

 
 
 
的std :: unordered_set
成员函数
原文:
Member functions
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::unordered_set
unordered_set::~unordered_set
unordered_set::operator=
unordered_set::get_allocator
迭代器
原文:
Iterators
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::begin
unordered_set::cbegin
unordered_set::end
unordered_set::cend
容量
原文:
Capacity
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::erase
unordered_set::size
unordered_set::max_size
修饰符
原文:
Modifiers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::clear
unordered_set::insert
unordered_set::emplace
unordered_set::emplace_hint
unordered_set::erase
unordered_set::swap
查找
原文:
Lookup
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::count
unordered_set::find
unordered_set::equal_range
斗接口
原文:
Bucket interface
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::begin2
unordered_set::end2
unordered_set::bucket_count
unordered_set::max_bucket_count
unordered_set::bucket_size
unordered_set::bucket
哈希政策
原文:
Hash policy
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::load_factor
unordered_set::max_load_factor
unordered_set::rehash
unordered_set::reserve
观察员
原文:
Observers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_set::hash_function
unordered_set::key_eq
 
explicit unordered_set( size_type bucket_count = /*implementation-defined*/,

                        const Hash& hash = Hash(),
                        const KeyEqual& equal = KeyEqual(),

                        const Allocator& alloc = Allocator() );
(1) (C++11 起)
explicit unordered_set( const Allocator& alloc );
(1) (C++11 起)
template< class InputIt >

unordered_set( InputIt first, InputIt last,
               size_type bucket_count = /*implementation-defined*/,
               const Hash& hash = Hash(),
               const KeyEqual& equal = KeyEqual(),

               const Allocator& alloc = Allocator() );
(2) (C++11 起)
unordered_set( const unordered_set& other );
(3) (C++11 起)
unordered_set( const unordered_set& other, const Allocator& alloc );
(3) (C++11 起)
unordered_set( unordered_set&& other );
(4) (C++11 起)
unordered_set( unordered_set&& other, const Allocator& alloc );
(4) (C++11 起)
unordered_set( std::initializer_list<value_type> init,

               size_type bucket_count = /*implementation-defined*/,
               const Hash& hash = Hash(),
               const KeyEqual& equal = KeyEqual(),

               const Allocator& alloc = Allocator() );
(5) (C++11 起)
从各种数据源,构建新的容器。可以选择使用最少数量的水桶创建的用户提供bucket_counthash作为散列函数,equal的功能键进行比较和alloc的分配器.
原文:
Constructs new container from a variety of data sources. Optionally uses user supplied bucket_count as a minimal number of buckets to create, hash as the hash function, equal as the function to compare keys and alloc as the allocator.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
1)
默认构造函数。构造空的容器.
原文:
default constructor. Constructs empty container.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
2)
构造的容器的内容的范围内[first, last).
原文:
constructs the container with the contents of the range [first, last).
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
3)
拷贝构造函数。副本的内容other构造的容器。 alloc不提供,分配器是通过调用std::allocator_traits<allocator_type>::select_on_copy_construction(other).
原文:
copy constructor. Constructs the container with the copy of the contents of other. If alloc is not provided, allocator is obtained by calling std::allocator_traits<allocator_type>::select_on_copy_construction(other).
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
4)
移动的构造函数。构造的容器与内容other使用移动语义。 alloc不提供,分配器是通过移动建设属于other从分配器.
原文:
move constructor. Constructs the container with the contents of other using move semantics. If alloc is not provided, allocator is obtained by move-construction from the allocator belonging to other.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
5)
构建容器初始化列表的内容init
原文:
constructs the container with the contents of the initializer list init.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

目录

[编辑] 参数

alloc -
使用这个容器中的所有内存分配的分配器
原文:
allocator to use for all memory allocations of this container
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
bucket_count -
在初始化时使用的桶的最小数量。如果它没有被指定,执行定义的缺省值被使用
原文:
minimal number of buckets to use on initialization. If it is not specified, implementation-defined default value is used
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
hash -
哈希函数来使用
原文:
hash function to use
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
equal -
比较函数来使用这个容器中的所有键进行比较
原文:
comparison function to use for all key comparisons of this container
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
first, last -
取值范围为从复制元素
原文:
the range to copy the elements from
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
other -
要用作源初始化容器的元素与另一个容器
原文:
another container to be used as source to initialize the elements of the container with
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
init -
的初始化列表初始化容器元素
原文:
initializer list to initialize the elements of the container with
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
类型要求
-
InputIt 必须满足 InputIterator 的要求。

[编辑] 复杂性

1)
不变
原文:
constant
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
2)
firstlast之间的距离呈线性关系
原文:
linear in distance between first and last
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
3)
线性大小other
原文:
linear in size of other
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
4)
不变。如果alloc,并给出alloc != other.get_allocator(),则采用线性.
原文:
constant. If alloc is given and alloc != other.get_allocator(), then linear.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
5)
线性大小init
原文:
linear in size of init
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 为例

[编辑] 另请参阅

将值分配到容器中
原文:
assigns values to the container
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]