This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
[associative.general]
# 23 Containers library [[containers]](./#containers)
## 23.4 Associative containers [[associative]](associative#general)
### 23.4.1 General [associative.general]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L11363)
The header [<map>](associative.map.syn#header:%3cmap%3e "23.4.2Header <map> synopsis[associative.map.syn]") defines the class templatesmap and multimap;
the header [<set>](associative.set.syn#header:%3cset%3e "23.4.5Header <set> synopsis[associative.set.syn]") defines the class templatesset and multiset[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L11369)
The following exposition-only alias templates may appear in deduction guides for associative containers:template<class InputIterator>using *iter-value-type* =typename iterator_traits<InputIterator>::value_type; // *exposition only*template<class InputIterator>using *iter-key-type* = remove_const_t< tuple_element_t<0, *iter-value-type*<InputIterator>>>; // *exposition only*template<class InputIterator>using *iter-mapped-type* = tuple_element_t<1, *iter-value-type*<InputIterator>>; // *exposition only*template<class InputIterator>using *iter-to-alloc-type* = pair< add_const_t<tuple_element_t<0, *iter-value-type*<InputIterator>>>,
tuple_element_t<1, *iter-value-type*<InputIterator>>>; // *exposition only*template<ranges::[input_range](range.refinements#concept:input_range "25.4.6Other range refinements[range.refinements]") Range>using *range-key-type* = remove_const_t<typename ranges::range_value_t<Range>::first_type>; // *exposition only*template<ranges::[input_range](range.refinements#concept:input_range "25.4.6Other range refinements[range.refinements]") Range>using *range-mapped-type* = typename ranges::range_value_t<Range>::second_type; // *exposition only*template<ranges::[input_range](range.refinements#concept:input_range "25.4.6Other range refinements[range.refinements]") Range>using *range-to-alloc-type* = pair<add_const_t<typename ranges::range_value_t<Range>::first_type>, typename ranges::range_value_t<Range>::second_type>; // *exposition only*

View File

@@ -0,0 +1,17 @@
[associative.map.syn]
# 23 Containers library [[containers]](./#containers)
## 23.4 Associative containers [[associative]](associative#map.syn)
### 23.4.2 Header <map> synopsis [associative.map.syn]
[🔗](#header:%3cmap%3e)
#include <compare> // see [[compare.syn]](compare.syn "17.12.1Header <compare> synopsis")#include <initializer_list> // see [[initializer.list.syn]](initializer.list.syn "17.11.2Header <initializer_­list> synopsis")namespace std {// [[map]](map "23.4.3Class template map"), class template maptemplate<class Key, class T, class Compare = less<Key>, 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]](map.erasure "23.4.3.5Erasure"), 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]](multimap "23.4.4Class template multimap"), class template multimaptemplate<class Key, class T, class Compare = less<Key>, 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]](multimap.erasure "23.4.4.4Erasure"), 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<Key>>using map = std::map<Key, T, Compare,
polymorphic_allocator<pair<const Key, T>>>; template<class Key, class T, class Compare = less<Key>>using multimap = std::multimap<Key, T, Compare,
polymorphic_allocator<pair<const Key, T>>>; }}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
[associative.reqmts.except]
# 23 Containers library [[containers]](./#containers)
## 23.2 Requirements [[container.requirements]](container.requirements#associative.reqmts.except)
### 23.2.7 Associative containers [[associative.reqmts]](associative.reqmts#except)
#### 23.2.7.2 Exception safety guarantees [associative.reqmts.except]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L4088)
For associative containers, no clear() function throws an exception[.](#1.sentence-1)
erase(k) does not throw an exception unless that exception is thrown
by the container's Compare object (if any)[.](#1.sentence-2)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L4093)
For associative containers, if an exception is thrown by any operation from
within an insert or emplace function inserting a single element, the
insertion has no effect[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/containers.tex#L4098)
For associative containers, no swap function throws an exception unless
that exception is thrown by the
swap of the container's Compare object (if any)[.](#3.sentence-1)

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
[associative.set.syn]
# 23 Containers library [[containers]](./#containers)
## 23.4 Associative containers [[associative]](associative#set.syn)
### 23.4.5 Header <set> synopsis [associative.set.syn]
[🔗](#header:%3cset%3e)
#include <compare> // see [[compare.syn]](compare.syn "17.12.1Header <compare> synopsis")#include <initializer_list> // see [[initializer.list.syn]](initializer.list.syn "17.11.2Header <initializer_­list> synopsis")namespace std {// [[set]](set "23.4.6Class template set"), class template settemplate<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>class set; template<class Key, class Compare, class Allocator>constexpr bool operator==(const set<Key, Compare, Allocator>& x, const set<Key, Compare, Allocator>& y); template<class Key, class Compare, class Allocator>constexpr *synth-three-way-result*<Key> operator<=>(const set<Key, Compare, Allocator>& x, const set<Key, Compare, Allocator>& y); template<class Key, class Compare, class Allocator>constexpr void swap(set<Key, Compare, Allocator>& x,
set<Key, Compare, Allocator>& y)noexcept(noexcept(x.swap(y))); // [[set.erasure]](set.erasure "23.4.6.3Erasure"), erasure for settemplate<class Key, class Compare, class Allocator, class Predicate>constexpr typename set<Key, Compare, Allocator>::size_type
erase_if(set<Key, Compare, Allocator>& c, Predicate pred); // [[multiset]](multiset "23.4.7Class template multiset"), class template multisettemplate<class Key, class Compare = less<Key>, class Allocator = allocator<Key>>class multiset; template<class Key, class Compare, class Allocator>constexpr bool operator==(const multiset<Key, Compare, Allocator>& x, const multiset<Key, Compare, Allocator>& y); template<class Key, class Compare, class Allocator>constexpr *synth-three-way-result*<Key>operator<=>(const multiset<Key, Compare, Allocator>& x, const multiset<Key, Compare, Allocator>& y); template<class Key, class Compare, class Allocator>constexpr void swap(multiset<Key, Compare, Allocator>& x,
multiset<Key, Compare, Allocator>& y)noexcept(noexcept(x.swap(y))); // [[multiset.erasure]](multiset.erasure "23.4.7.3Erasure"), erasure for multisettemplate<class Key, class Compare, class Allocator, class Predicate>constexpr typename multiset<Key, Compare, Allocator>::size_type
erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred); namespace pmr {template<class Key, class Compare = less<Key>>using set = std::set<Key, Compare, polymorphic_allocator<Key>>; template<class Key, class Compare = less<Key>>using multiset = std::multiset<Key, Compare, polymorphic_allocator<Key>>; }}