erase_if(std::unordered_map<Key, T, Hash, KeyEqual, Alloc>&c, Pred pred); (since C++20) Erases all elements that satisfy the predicatepredfromc. Equivalent to autoold_size=c.size();for(autofirst=c.begin(), last=c.end();first!=last;){if(pred(*first))first=c.erase(first);else...
unordered_map::beginunordered_map::cbegin unordered_map::endunordered_map::cend Capacity unordered_map::size unordered_map::max_size unordered_map::empty Modifiers unordered_map::clear unordered_map::erase unordered_map::swap unordered_map::extract ...
std::unordered_multimap 在标头<unordered_map>定义 template< classKey, classT, classHash=std::hash<Key>, classKeyEqual=std::equal_to<Key>, classAllocator=std::allocator<std::pair<constKey, T>> >classunordered_multimap; (1)(C++11 起) ...
LWG 464 C++98 以鍵訪問 const map 不方便 提供at 函數 參閱 multimap 鍵值對的集合,按照鍵排序 (類模板) unordered_map (C++11 起) 鍵值對的集合,按照鍵生成散列,鍵是唯一的 (類模板) flat_map (C++23) 適配兩個容器以提供按唯一鍵排序的鍵值對集合 (類模板) 首頁...
unordered_map::size unordered_map::max_size unordered_map::empty Modifiers unordered_map::clear unordered_map::erase unordered_map::swap unordered_map::extract (C++17) unordered_map::merge (C++17) unordered_map::insert unordered_map::insert_range ...
unordered_map::size unordered_map::max_size unordered_map::empty Modifiers unordered_map::clear unordered_map::erase unordered_map::swap unordered_map::extract (C++17) unordered_map::merge (C++17) unordered_map::insert unordered_map::insert_range ...
__cpp_lib_unordered_map_try_emplace std::unordered_map::try_emplace、std::unordered_map::insert_or_assign 201411L (C++17) N4279 __cpp_lib_unreachable std::unreachable 202202L (C++23) P0627R6 __cpp_lib_unwrap_ref std::unwrap_ref_decay 和std::unwrap_reference 201811L (C++20) P...
std::map满足容器(Container)、知分配器容器(AllocatorAwareContainer)、关联容器(AssociativeContainer)和可逆容器(ReversibleContainer)。 std::map的全部成员函数均为constexpr:在常量表达式求值中创建并使用std::map对象是可能的。 然而,std::map对象通常不能为constexpr,因为任何动态分配的存储都必须在相同的常量表达式...
unordered_multimap<K, T, H, P, A>::size_type erase_if(unordered_multimap<K, T, H, P, A>& c, Predicate pred); namespace pmr { template<class Key, class T, class Hash = hash<Key>, class Pred = equal_to<Key>> using unordered_map = std::unordered_map<Key, T, Hash, Pred,...
unordered_map::beginunordered_map::cbegin unordered_map::endunordered_map::cend Capacity unordered_map::size unordered_map::max_size unordered_map::empty Modifiers unordered_map::clear unordered_map::erase unordered_map::swap unordered_map::extract (C++17) unordered_map::merge (C++17) unordered...