![]() |
MySQL 9.6.0
Source Code Documentation
|
Namespaces | |
| namespace | buffers |
| namespace | throwing |
Classes | |
| class | Basic_container_wrapper |
| CRTP base class (mixin) to define a wrapper around a container. More... | |
Functions | |
| void | node_handle_assign (auto &node_handle, auto &iterator) noexcept |
For a node_handle retrieved from the extract member of one of the std::[unordered_][multi]{set|map} containers, and an iterator over a container with the same value_type, copy the value pointed to by the iterator to the node_handle. More... | |
| template<class Map_or_set_t > | |
| auto | make_empty_map_or_set_and_copy_metadata (const Map_or_set_t &map_or_set) |
| Return a new object of the same type as the parameter, without any elements, with the same allocator, and if the object type has key comparison, the same comparison object. More... | |
| template<class Source_iterator_t > | |
| auto | map_or_set_assign (auto &map_or_set, const Source_iterator_t &first, const std::sentinel_for< Source_iterator_t > auto &last) noexcept |
Replace the contents of container with that of the range given by the two iterators, minimizing memory allocations. More... | |
| auto mysql::containers::make_empty_map_or_set_and_copy_metadata | ( | const Map_or_set_t & | map_or_set | ) |
Return a new object of the same type as the parameter, without any elements, with the same allocator, and if the object type has key comparison, the same comparison object.
|
noexcept |
Replace the contents of container with that of the range given by the two iterators, minimizing memory allocations.
This reuses existing nodes of the target container as far as possible, and allocates new ones only if the source has more nodes than the target container.
It does not copy the allocator.
Informally, this is to std::map what std::vector:assign is to std::vector.
| map_or_set | Container to overwrite. |
| first | Iterator to first element of new contents. |
| last | Iterator to last element of new contents. |
| Return_status::ok | Success |
| Return_status::error | Out of memory. This can only occur if the source range has more elements than the container. |
|
noexcept |
For a node_handle retrieved from the extract member of one of the std::[unordered_][multi]{set|map} containers, and an iterator over a container with the same value_type, copy the value pointed to by the iterator to the node_handle.
The purpose is to provide a uniform API, since node_handle objects of sets and maps are different.
| node_handle | Node handle to copy to. |
| iterator | Iterator to the value to copy from. |