std::unordered_map::emplace_hint

来自cppreference.com

 
 
 
std::unordered_map
成员函数
原文:
Member functions
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::unordered_map
unordered_map::~unordered_map
unordered_map::operator=
unordered_map::get_allocator
迭代器
原文:
Iterators
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::begin
unordered_map::cbegin
unordered_map::end
unordered_map::cend
容量
原文:
Capacity
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::erase
unordered_map::size
unordered_map::max_size
修饰符
原文:
Modifiers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::clear
unordered_map::insert
unordered_map::emplace
unordered_map::emplace_hint
unordered_map::erase
unordered_map::swap
查找
原文:
Lookup
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::count
unordered_map::find
unordered_map::equal_range
斗接口
原文:
Bucket interface
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::begin2
unordered_map::end2
unordered_map::bucket_count
unordered_map::max_bucket_count
unordered_map::bucket_size
unordered_map::bucket
哈希政策
原文:
Hash policy
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::load_factor
unordered_map::max_load_factor
unordered_map::rehash
unordered_map::reserve
观察员
原文:
Observers
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
unordered_map::hash_function
unordered_map::key_eq
 
template <class... Args>
iterator emplace_hint( const_iterator hint, Args&&... args );
(C++11 起)
插入一个新元素的容器,使用hint一个建议,其中的元素。该元件是构成在就地,即没有复制或移动操作进行。 The constructor of the element type (value_type, that is, std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)....
原文:
Inserts a new element to the container, using hint as a suggestion where the element should go. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element type (value_type, that is, std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)....
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

If rehashing occurs due to the insertion, all iterators are invalidated. Otherwise iterators are not affected. References are not invalidated. Rehashing occurs only if the new number of elements is higher than max_load_factor()*bucket_count().

目录

[编辑] 参数

hint -
迭代器,用于插入新的元素,作为一个建议
原文:
iterator, used as a suggestion as to where to insert the new element
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里
args -
元素的构造函数的参数转发
原文:
arguments to forward to the constructor of the element
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

[编辑] 返回值

返回一个迭代器新插入的元素.
原文:
Returns an iterator to the newly inserted element.
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

If the insertion failed because the element already exists, returns an iterator to the already existing element with the equivalent key.

[编辑] 复杂性

Amortized constant on average, worst case linear in the size of the container.

[编辑] 另请参阅

就地构造元素
(公共成员函数) [edit]
插入元素
原文:
inserts elements
这段文字是通过 Google Translate 自动翻译生成的。
您可以帮助我们检查、纠正翻译中的错误。详情请点击这里

(公共成员函数) [edit]