From Jason Turner

[forward.list.cons]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp57t47fin/{from.md → to.md} +53 -0
tmp/tmp57t47fin/{from.md → to.md} RENAMED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Constructors, copy, and assignment <a id="forward.list.cons">[[forward.list.cons]]</a>
2
+
3
+ ``` cpp
4
+ explicit forward_list(const Allocator&);
5
+ ```
6
+
7
+ *Effects:* Constructs an empty `forward_list` object using the specified
8
+ allocator.
9
+
10
+ *Complexity:* Constant.
11
+
12
+ ``` cpp
13
+ explicit forward_list(size_type n, const Allocator& = Allocator());
14
+ ```
15
+
16
+ *Preconditions:* `T` is *Cpp17DefaultInsertable* into `*this`.
17
+
18
+ *Effects:* Constructs a `forward_list` object with `n` default-inserted
19
+ elements using the specified allocator.
20
+
21
+ *Complexity:* Linear in `n`.
22
+
23
+ ``` cpp
24
+ forward_list(size_type n, const T& value, const Allocator& = Allocator());
25
+ ```
26
+
27
+ *Preconditions:* `T` is *Cpp17CopyInsertable* into `*this`.
28
+
29
+ *Effects:* Constructs a `forward_list` object with `n` copies of `value`
30
+ using the specified allocator.
31
+
32
+ *Complexity:* Linear in `n`.
33
+
34
+ ``` cpp
35
+ template<class InputIterator>
36
+ forward_list(InputIterator first, InputIterator last, const Allocator& = Allocator());
37
+ ```
38
+
39
+ *Effects:* Constructs a `forward_list` object equal to the range
40
+ \[`first`, `last`).
41
+
42
+ *Complexity:* Linear in `distance(first, last)`.
43
+
44
+ ``` cpp
45
+ template<container-compatible-range<T> R>
46
+ forward_list(from_range_t, R&& rg, const Allocator& = Allocator());
47
+ ```
48
+
49
+ *Effects:* Constructs a `forward_list` object with the elements of the
50
+ range `rg`.
51
+
52
+ *Complexity:* Linear in `ranges::distance(rg)`.
53
+