Files
cppdraft_translate/cppdraft/associative/map/syn.md
2025-10-25 03:02:53 +03:00

2.8 KiB

[associative.map.syn]

23 Containers library [containers]

23.4 Associative containers [associative]

23.4.2 Header synopsis [associative.map.syn]

🔗

#include // see [compare.syn]#include <initializer_list> // see [initializer.list.syn]namespace std {// [map], class template maptemplate<class Key, class T, class Compare = less, class Allocator = allocator<pair<const Key, T>>>class map; template<class Key, class T, class Compare, class Allocator>constexpr bool operator==(const map<Key, T, Compare, Allocator>& x, const map<Key, T, Compare, Allocator>& y); template<class Key, class T, class Compare, class Allocator>constexpr synth-three-way-result<pair<const Key, T>>operator<=>(const map<Key, T, Compare, Allocator>& x, const map<Key, T, Compare, Allocator>& y); template<class Key, class T, class Compare, class Allocator>constexpr void swap(map<Key, T, Compare, Allocator>& x, map<Key, T, Compare, Allocator>& y)noexcept(noexcept(x.swap(y))); // [map.erasure], erasure for maptemplate<class Key, class T, class Compare, class Allocator, class Predicate>constexpr typename map<Key, T, Compare, Allocator>::size_type erase_if(map<Key, T, Compare, Allocator>& c, Predicate pred); // [multimap], class template multimaptemplate<class Key, class T, class Compare = less, class Allocator = allocator<pair<const Key, T>>>class multimap; template<class Key, class T, class Compare, class Allocator>constexpr bool operator==(const multimap<Key, T, Compare, Allocator>& x, const multimap<Key, T, Compare, Allocator>& y); template<class Key, class T, class Compare, class Allocator>constexpr synth-three-way-result<pair<const Key, T>>operator<=>(const multimap<Key, T, Compare, Allocator>& x, const multimap<Key, T, Compare, Allocator>& y); template<class Key, class T, class Compare, class Allocator>constexpr void swap(multimap<Key, T, Compare, Allocator>& x, multimap<Key, T, Compare, Allocator>& y)noexcept(noexcept(x.swap(y))); // [multimap.erasure], erasure for multimaptemplate<class Key, class T, class Compare, class Allocator, class Predicate>constexpr typename multimap<Key, T, Compare, Allocator>::size_type erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred); namespace pmr {template<class Key, class T, class Compare = less>using map = std::map<Key, T, Compare, polymorphic_allocator<pair<const Key, T>>>; template<class Key, class T, class Compare = less>using multimap = std::multimap<Key, T, Compare, polymorphic_allocator<pair<const Key, T>>>; }}