This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.

### 1166. Allocator-specific move/copy break model of move-constructor and move-assignment

Section: 99 [allocator.propagation], 99 [allocator.propagation.map], 22 [containers] Status: Resolved Submitter: LWG Opened: 2009-06-28 Last modified: 2016-01-28

Priority: Not Prioritized

View all issues with Resolved status.

Discussion:

Addresses US 77

Description

Allocator-specific move and copy behavior for containers (N2525) complicates a little-used and already-complicated portion of the standard library (allocators), and breaks the conceptual model of move-constructor and move-assignment operations on standard containers being efficient operations. The extensions for allocator-specific move and copy behavior should be removed from the working paper.

With the introduction of rvalue references, we are teaching programmers that moving from a standard container (e.g., a `vector<string>`) is an efficient, constant-time operation. The introduction of N2525 removed that guarantee; depending on the behavior of four different traits (20.8.4), the complexity of copy and move operations can be constant or linear time. This level of customization greatly increases the complexity of standard containers, and benefits only a tiny fraction of the C++ community.

Suggestion

Remove 20.8.4.

Remove 20.8.5.

Remove all references to the facilities in 20.8.4 and 20.8.5 from clause 23.

[ 2009-10 Santa Cruz: ]

> NAD Editorial Resolved. Addressed by N2982.

Proposed resolution: