tmp/tmpdf_37zkl/{from.md → to.md}
RENAMED
|
@@ -110,11 +110,11 @@ template<class... UTypes> constexpr explicit(see below) tuple(tuple<UTypes...>&
|
|
| 110 |
template<class... UTypes> constexpr explicit(see below) tuple(const tuple<UTypes...>& u);
|
| 111 |
template<class... UTypes> constexpr explicit(see below) tuple(tuple<UTypes...>&& u);
|
| 112 |
template<class... UTypes> constexpr explicit(see below) tuple(const tuple<UTypes...>&& u);
|
| 113 |
```
|
| 114 |
|
| 115 |
-
Let `I` be the pack `0, 1,
|
| 116 |
*`FWD`*`(u)` be `static_cast<decltype(u)>(u)`.
|
| 117 |
|
| 118 |
*Constraints:*
|
| 119 |
|
| 120 |
- `sizeof...(Types)` equals `sizeof...(UTypes)`, and
|
|
@@ -181,21 +181,21 @@ is `true`.
|
|
| 181 |
``` cpp
|
| 182 |
template<tuple-like UTuple>
|
| 183 |
constexpr explicit(see below) tuple(UTuple&& u);
|
| 184 |
```
|
| 185 |
|
| 186 |
-
Let `I` be the pack `0, 1, …, (sizeof...(Types) - 1)`.
|
| 187 |
|
| 188 |
*Constraints:*
|
| 189 |
|
| 190 |
- `different-from<UTuple, tuple>` [[range.utility.helpers]] is `true`,
|
| 191 |
- `remove_cvref_t<UTuple>` is not a specialization of
|
| 192 |
`ranges::subrange`,
|
| 193 |
- `sizeof...(Types)` equals `tuple_size_v<remove_cvref_t<UTuple>>`,
|
| 194 |
- `(is_constructible_v<Types, decltype(get<I>(std::forward<UTuple>(u)))> && ...)`
|
| 195 |
is `true`, and
|
| 196 |
-
- either `sizeof...(Types)` is not
|
| 197 |
`T`) `is_convertible_v<UTuple, T>` and `is_constructible_v<T, UTuple>`
|
| 198 |
are both `false`.
|
| 199 |
|
| 200 |
*Effects:* For all i, initializes the iᵗʰ element of `*this` with
|
| 201 |
`get<`i`>(std::forward<UTuple>(u))`.
|
|
@@ -204,10 +204,19 @@ Let `I` be the pack `0, 1, …, (sizeof...(Types) - 1)`.
|
|
| 204 |
|
| 205 |
``` cpp
|
| 206 |
!(is_convertible_v<decltype(get<I>(std::forward<UTuple>(u))), Types> && ...)
|
| 207 |
```
|
| 208 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
``` cpp
|
| 210 |
template<class Alloc>
|
| 211 |
constexpr explicit(see below)
|
| 212 |
tuple(allocator_arg_t, const Alloc& a);
|
| 213 |
template<class Alloc>
|
|
|
|
| 110 |
template<class... UTypes> constexpr explicit(see below) tuple(const tuple<UTypes...>& u);
|
| 111 |
template<class... UTypes> constexpr explicit(see below) tuple(tuple<UTypes...>&& u);
|
| 112 |
template<class... UTypes> constexpr explicit(see below) tuple(const tuple<UTypes...>&& u);
|
| 113 |
```
|
| 114 |
|
| 115 |
+
Let `I` be the pack `0, 1, `…`, (sizeof...(Types) - 1)`. Let
|
| 116 |
*`FWD`*`(u)` be `static_cast<decltype(u)>(u)`.
|
| 117 |
|
| 118 |
*Constraints:*
|
| 119 |
|
| 120 |
- `sizeof...(Types)` equals `sizeof...(UTypes)`, and
|
|
|
|
| 181 |
``` cpp
|
| 182 |
template<tuple-like UTuple>
|
| 183 |
constexpr explicit(see below) tuple(UTuple&& u);
|
| 184 |
```
|
| 185 |
|
| 186 |
+
Let `I` be the pack `0, 1, `…`, (sizeof...(Types) - 1)`.
|
| 187 |
|
| 188 |
*Constraints:*
|
| 189 |
|
| 190 |
- `different-from<UTuple, tuple>` [[range.utility.helpers]] is `true`,
|
| 191 |
- `remove_cvref_t<UTuple>` is not a specialization of
|
| 192 |
`ranges::subrange`,
|
| 193 |
- `sizeof...(Types)` equals `tuple_size_v<remove_cvref_t<UTuple>>`,
|
| 194 |
- `(is_constructible_v<Types, decltype(get<I>(std::forward<UTuple>(u)))> && ...)`
|
| 195 |
is `true`, and
|
| 196 |
+
- either `sizeof...(Types)` is not 1, or (when `Types...` expands to
|
| 197 |
`T`) `is_convertible_v<UTuple, T>` and `is_constructible_v<T, UTuple>`
|
| 198 |
are both `false`.
|
| 199 |
|
| 200 |
*Effects:* For all i, initializes the iᵗʰ element of `*this` with
|
| 201 |
`get<`i`>(std::forward<UTuple>(u))`.
|
|
|
|
| 204 |
|
| 205 |
``` cpp
|
| 206 |
!(is_convertible_v<decltype(get<I>(std::forward<UTuple>(u))), Types> && ...)
|
| 207 |
```
|
| 208 |
|
| 209 |
+
The constructor is defined as deleted if
|
| 210 |
+
|
| 211 |
+
``` cpp
|
| 212 |
+
(reference_constructs_from_temporary_v<Types, decltype(get<I>(std::forward<UTuple>(u)))>
|
| 213 |
+
|| ...)
|
| 214 |
+
```
|
| 215 |
+
|
| 216 |
+
is `true`.
|
| 217 |
+
|
| 218 |
``` cpp
|
| 219 |
template<class Alloc>
|
| 220 |
constexpr explicit(see below)
|
| 221 |
tuple(allocator_arg_t, const Alloc& a);
|
| 222 |
template<class Alloc>
|