From Jason Turner

[indirect.ctor]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmptynzorcn/{from.md → to.md} +158 -0
tmp/tmptynzorcn/{from.md → to.md} RENAMED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Constructors <a id="indirect.ctor">[[indirect.ctor]]</a>
2
+
3
+ The following element applies to all functions in  [[indirect.ctor]]:
4
+
5
+ *Throws:* Nothing unless `allocator_traits<Allocator>::allocate` or
6
+ `allocator_traits<Allocator>::construct` throws.
7
+
8
+ ``` cpp
9
+ constexpr explicit indirect();
10
+ ```
11
+
12
+ *Constraints:* `is_default_constructible_v<Allocator>` is `true`.
13
+
14
+ *Mandates:* `is_default_constructible_v<T>` is `true`.
15
+
16
+ *Effects:* Constructs an owned object of type `T` with an empty argument
17
+ list, using the allocator *alloc*.
18
+
19
+ ``` cpp
20
+ constexpr explicit indirect(allocator_arg_t, const Allocator& a);
21
+ ```
22
+
23
+ *Mandates:* `is_default_constructible_v<T>` is `true`.
24
+
25
+ *Effects:* *alloc* is direct-non-list-initialized with `a`. Constructs
26
+ an owned object of type `T` with an empty argument list, using the
27
+ allocator *alloc*.
28
+
29
+ ``` cpp
30
+ constexpr indirect(const indirect& other);
31
+ ```
32
+
33
+ *Mandates:* `is_copy_constructible_v<T>` is `true`.
34
+
35
+ *Effects:* *alloc* is direct-non-list-initialized with
36
+ `allocator_traits<Allocator>::select_on_container_copy_construction(other.`*`alloc`*`)`.
37
+ If `other` is valueless, `*this` is valueless. Otherwise, constructs an
38
+ owned object of type `T` with `*other`, using the allocator *alloc*.
39
+
40
+ ``` cpp
41
+ constexpr indirect(allocator_arg_t, const Allocator& a, const indirect& other);
42
+ ```
43
+
44
+ *Mandates:* `is_copy_constructible_v<T>` is `true`.
45
+
46
+ *Effects:* *alloc* is direct-non-list-initialized with `a`. If `other`
47
+ is valueless, `*this` is valueless. Otherwise, constructs an owned
48
+ object of type `T` with `*other`, using the allocator *alloc*.
49
+
50
+ ``` cpp
51
+ constexpr indirect(indirect&& other) noexcept;
52
+ ```
53
+
54
+ *Effects:* *alloc* is direct-non-list-initialized from
55
+ `std::move(other.`*`alloc`*`)`. If `other` is valueless, `*this` is
56
+ valueless. Otherwise `*this` takes ownership of the owned object of
57
+ `other`.
58
+
59
+ *Ensures:* `other` is valueless.
60
+
61
+ ``` cpp
62
+ constexpr indirect(allocator_arg_t, const Allocator& a, indirect&& other)
63
+ noexcept(allocator_traits<Allocator>::is_always_equal::value);
64
+ ```
65
+
66
+ *Mandates:* If `allocator_traits<Allocator>::is_always_equal::value` is
67
+ `false` then `T` is a complete type.
68
+
69
+ *Effects:* *alloc* is direct-non-list-initialized with `a`. If `other`
70
+ is valueless, `*this` is valueless. Otherwise, if
71
+ *`alloc`*` == other.`*`alloc`* is `true`, constructs an object of type
72
+ `indirect` that takes ownership of the owned object of `other`.
73
+ Otherwise, constructs an owned object of type `T` with
74
+ `*std::move(other)`, using the allocator *alloc*.
75
+
76
+ *Ensures:* `other` is valueless.
77
+
78
+ ``` cpp
79
+ template<class U = T>
80
+ constexpr explicit indirect(U&& u);
81
+ ```
82
+
83
+ *Constraints:*
84
+
85
+ - `is_same_v<remove_cvref_t<U>, indirect>` is `false`,
86
+ - `is_same_v<remove_cvref_t<U>, in_place_t>` is `false`,
87
+ - `is_constructible_v<T, U>` is `true`, and
88
+ - `is_default_constructible_v<Allocator>` is `true`.
89
+
90
+ *Effects:* Constructs an owned object of type `T` with
91
+ `std::forward<U>(u)`, using the allocator *alloc*.
92
+
93
+ ``` cpp
94
+ template<class U = T>
95
+ constexpr explicit indirect(allocator_arg_t, const Allocator& a, U&& u);
96
+ ```
97
+
98
+ *Constraints:*
99
+
100
+ - `is_same_v<remove_cvref_t<U>, indirect>` is `false`,
101
+ - `is_same_v<remove_cvref_t<U>, in_place_t>` is `false`, and
102
+ - `is_constructible_v<T, U>` is `true`.
103
+
104
+ *Effects:* *alloc* is direct-non-list-initialized with `a`. Constructs
105
+ an owned object of type `T` with `std::forward<U>(u)`, using the
106
+ allocator *alloc*.
107
+
108
+ ``` cpp
109
+ template<class... Us>
110
+ constexpr explicit indirect(in_place_t, Us&&... us);
111
+ ```
112
+
113
+ *Constraints:*
114
+
115
+ - `is_constructible_v<T, Us...>` is `true`, and
116
+ - `is_default_constructible_v<Allocator>` is `true`.
117
+
118
+ *Effects:* Constructs an owned object of type `T` with
119
+ `std::forward<Us>(us)...`, using the allocator *alloc*.
120
+
121
+ ``` cpp
122
+ template<class... Us>
123
+ constexpr explicit indirect(allocator_arg_t, const Allocator& a,
124
+ in_place_t, Us&& ...us);
125
+ ```
126
+
127
+ *Constraints:* `is_constructible_v<T, Us...>` is `true`.
128
+
129
+ *Effects:* *alloc* is direct-non-list-initialized with `a`. Constructs
130
+ an owned object of type `T` with `std::forward<Us>(us)...`, using the
131
+ allocator *alloc*.
132
+
133
+ ``` cpp
134
+ template<class I, class... Us>
135
+ constexpr explicit indirect(in_place_t, initializer_list<I> ilist, Us&&... us);
136
+ ```
137
+
138
+ *Constraints:*
139
+
140
+ - `is_constructible_v<T, initializer_list<I>&, Us...>` is `true`, and
141
+ - `is_default_constructible_v<Allocator>` is `true`.
142
+
143
+ *Effects:* Constructs an owned object of type `T` with the arguments
144
+ `ilist, std::forward<Us>(us)...`, using the allocator *alloc*.
145
+
146
+ ``` cpp
147
+ template<class I, class... Us>
148
+ constexpr explicit indirect(allocator_arg_t, const Allocator& a,
149
+ in_place_t, initializer_list<I> ilist, Us&&... us);
150
+ ```
151
+
152
+ *Constraints:* `is_constructible_v<T, initializer_list<I>&, Us...>` is
153
+ `true`.
154
+
155
+ *Effects:* *alloc* is direct-non-list-initialized with `a`. Constructs
156
+ an owned object of type `T` with the arguments
157
+ `ilist, std::forward<Us>(us)...`, using the allocator *alloc*.
158
+