uploaded current status

This commit is contained in:
joaquintides
2022-10-31 19:27:35 +01:00
parent 2068cf8d5b
commit 300f5554e5
87 changed files with 1359 additions and 112 deletions
+35 -27
View File
@@ -145,12 +145,6 @@ namespace boost {
template<class M>
iterator xref:#unordered_flat_map_insert_or_assign_with_hint[insert_or_assign](const_iterator hint, key_type&& k, M&& obj);
node_type xref:#unordered_flat_map_extract_by_iterator[extract](const_iterator position);
node_type xref:#unordered_flat_map_extract_by_key[extract](const key_type& k);
template<class K> node_type xref:#unordered_flat_map_transparent_extract_by_key[extract](K&& k);
insert_return_type xref:#unordered_flat_map_insert_with_node_handle[insert](node_type&& nh);
iterator xref:#unordered_flat_map_insert_with_hint_and_node_handle[insert](const_iterator hint, node_type&& nh);
void xref:#unordered_flat_map_erase_by_position[erase](iterator position);
void xref:#unordered_flat_map_erase_by_position[erase](const_iterator position);
size_type xref:#unordered_flat_map_erase_by_key[erase](const key_type& k);
@@ -204,6 +198,7 @@ namespace boost {
float xref:#unordered_flat_map_load_factor[load_factor]() const noexcept;
float xref:#unordered_flat_map_max_load_factor[max_load_factor]() const noexcept;
void xref:#unordered_flat_map_set_max_load_factor[max_load_factor](float z);
size_type xref:#unordered_flat_map_max_load[max_load]() const noexcept;
void xref:#unordered_flat_map_rehash[rehash](size_type n);
void xref:#unordered_flat_map_reserve[reserve](size_type n);
};
@@ -250,7 +245,7 @@ https://en.cppreference.com/w/cpp/named_req/Erasable[Erasable^] from the contain
|A unary function object type that acts a hash function for a `Key`. It takes a single argument of type `Key` and returns a value of type `std::size_t`.
|_Pred_
|A binary function object that implements an equivalence relation on values of type `Key`. A binary function object that induces an equivalence relation on values of type `Key`. It takes two arguments of type `Key` and returns a value of type `bool`.
|A binary function object that induces an equivalence relation on values of type `Key`. It takes two arguments of type `Key` and returns a value of type `bool`.
|_Allocator_
|An allocator whose value type is the same as the container's value type.
@@ -266,7 +261,7 @@ original position is used.
The size of the bucket array can be automatically increased by a call to `insert`/`emplace`, or as a result of calling
`rehash`/`reserve`. The _load factor_ of the container (number of elements divided by number of buckets) is never
greater than `max_load_factor()`, except possibly for small sizes where the implementation may decide to
allow for higher load factors.
allow for higher loads.
If `xref:hash_traits_hash_is_avalanching[hash_is_avalanching]<Hash>::value` is `true`, the hash function
is used as-is; otherwise, a bit-mixing post-processing stage is added to increase the quality of hashing
@@ -317,9 +312,9 @@ Requires:;; If the defaults are used, `hasher`, `key_equal` and `allocator_type`
==== Bucket Count Constructor
```c++
explicit unordered_flat_map(size_type n,
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
const hasher& hf = hasher(),
const key_equal& eql = key_equal(),
const allocator_type& a = allocator_type());
```
Constructs an empty container with at least `n` buckets, using `hf` as the hash
@@ -563,7 +558,7 @@ const_iterator begin() const noexcept;
[horizontal]
Returns:;; An iterator referring to the first element of the container, or if the container is empty the past-the-end value for the container.
Complexity:;; Linear
Complexity:;; O(`bucket_count()`)
---
@@ -585,7 +580,7 @@ const_iterator cbegin() const noexcept;
[horizontal]
Returns:;; A `const_iterator` referring to the first element of the container, or if the container is empty the past-the-end value for the container.
Complexity:;; Linear
Complexity:;; O(`bucket_count()`)
---
@@ -649,7 +644,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load. +
---
@@ -668,7 +663,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load. +
---
@@ -686,7 +681,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load. +
+
A call of the form `insert(x)`, where `x` is equally convertible to both `const value_type&` and `const init_type&`, is not ambiguous and selects the `init_type` overload.
@@ -706,7 +701,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load. +
+
A call of the form `insert(x)`, where `x` is equally convertible to both `value_type&&` and `init_type&&`, is not ambiguous and selects the `init_type` overload.
@@ -727,7 +722,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load. +
+
A call of the form `insert(hint, x)`, where `x` is equally convertible to both `const value_type&` and `const init_type&`, is not ambiguous and selects the `init_type` overload.
@@ -749,7 +744,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load. +
+
A call of the form `insert(hint, x)`, where `x` is equally convertible to both `value_type&&` and `init_type&&`, is not ambiguous and selects the `init_type` overload.
@@ -765,7 +760,7 @@ Inserts a range of elements into the container. Elements are inserted if and onl
[horizontal]
Requires:;; `value_type` is https://en.cppreference.com/w/cpp/named_req/EmplaceConstructible[EmplaceConstructible^] into the container from `*first`.
Throws:;; When inserting a single element, if an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load.
---
@@ -779,7 +774,7 @@ Inserts a range of elements into the container. Elements are inserted if and onl
[horizontal]
Requires:;; `value_type` is https://en.cppreference.com/w/cpp/named_req/EmplaceConstructible[EmplaceConstructible^] into the container from `*first`.
Throws:;; When inserting a single element, if an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load.
---
@@ -812,7 +807,7 @@ value_type(std::piecewise_construct,
unlike xref:#unordered_flat_map_emplace[emplace], which simply forwards all arguments to ``value_type``'s constructor.
Can invalidate iterators pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor.
Can invalidate iterators pointers and references, but only if the insert causes the load to be greater than the maximum load.
--
@@ -847,7 +842,7 @@ value_type(std::piecewise_construct,
unlike xref:#unordered_flat_map_emplace_hint[emplace_hint], which simply forwards all arguments to ``value_type``'s constructor.
Can invalidate iterators pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor.
Can invalidate iterators pointers and references, but only if the insert causes the load to be greater than the maximum load.
--
@@ -877,7 +872,7 @@ Returns:;; The `bool` component of the return type is `true` if an insert took p
+
If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor. +
Notes:;; Can invalidate iterators pointers and references, but only if the insert causes the load to be greater than the maximum load. +
---
@@ -905,7 +900,7 @@ value_type(std::piecewise_construct,
[horizontal]
Returns:;; If an insert took place, then the iterator points to the newly inserted element. Otherwise, it points to the element with equivalent key.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load.
---
@@ -991,7 +986,7 @@ void clear() noexcept;
Erases all elements in the container.
[horizontal]
Postconditions:;; `size() == 0`
Postconditions:;; `size() == 0`, `max_load() >= max_load_factor() * bucket_count()`
---
@@ -1108,7 +1103,7 @@ mapped_type& operator[](key_type&& k);
Effects:;; If the container does not already contain an element with a key equivalent to `k`, inserts the value `std::pair<key_type const, mapped_type>(k, mapped_type())`.
Returns:;; A reference to `x.second` where `x` is the element already in the container, or the newly inserted element with a key equivalent to `k`.
Throws:;; If an exception is thrown by an operation other than a call to `hasher` the function has no effect.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load factor to be greater than the maximum load factor.
Notes:;; Can invalidate iterators, pointers and references, but only if the insert causes the load to be greater than the maximum load.
---
@@ -1170,6 +1165,19 @@ Effects:;; Does nothing, as the user is not allowed to change this parameter. Ke
---
==== max_load
```c++
size_type max_load() const noexcept;
```
[horizontal]
Returns:;; The maximum number of elements the container can hold without rehashing, assuming that no further elements will be erased.
Note:;; After construction, rehash or clearance, the container's maximum load is at least `max_load_factor() * bucket_count()`. This load will decrease by the number of elements inserted,
but won't increase at the same rate on erasure.
---
==== rehash
```c++
void rehash(size_type n);