From Jason Turner

[container.requirements.pre]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpprxsm1ki/{from.md → to.md} +27 -0
tmp/tmpprxsm1ki/{from.md → to.md} RENAMED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Preamble <a id="container.requirements.pre">[[container.requirements.pre]]</a>
2
+
3
+ Containers are objects that store other objects. They control allocation
4
+ and deallocation of these objects through constructors, destructors,
5
+ insert and erase operations.
6
+
7
+ All of the complexity requirements in this Clause are stated solely in
8
+ terms of the number of operations on the contained objects.
9
+
10
+ [*Example 1*: The copy constructor of type `vector<vector<int>>` has
11
+ linear complexity, even though the complexity of copying each contained
12
+ `vector<int>` is itself linear. — *end example*]
13
+
14
+ Allocator-aware containers [[container.alloc.reqmts]] other than
15
+ `basic_string` construct elements using the function
16
+ `allocator_traits<allocator_type>::rebind_traits<U>::{}construct` and
17
+ destroy elements using the function
18
+ `allocator_traits<allocator_type>::rebind_traits<U>::{}destroy`
19
+ [[allocator.traits.members]], where `U` is either
20
+ `allocator_type::value_type` or an internal type used by the container.
21
+ These functions are called only for the container’s element type, not
22
+ for internal types used by the container.
23
+
24
+ [*Note 1*: This means, for example, that a node-based container would
25
+ need to construct nodes containing aligned buffers and call `construct`
26
+ to place the element into the buffer. — *end note*]
27
+