C++ allocators provide some additional properties that are above and beyond is_always_equal. Specifically, the author of a C++ allocator can optionally define the following:
-
- propagate_on_container_copy_assignment
- propagate_on_container_move_assignment
- propagate_on_container_swap
The optional properties tell a container how the allocator should be handled during a specific operation (that is, copy, move, and swap). Specifically, when a container is copied, moved, or swapped, the allocator isn't touched and, as we will show, this can result in inefficiencies. The propagate properties tell the container to propagate the operation to the allocator. For example, if propagate_on_container_copy_assignment ...