tmp/tmpexlg7aiv/{from.md → to.md}
RENAMED
|
@@ -8,15 +8,20 @@ namespace ranges {
|
|
| 8 |
template<class T, class... Args>
|
| 9 |
constexpr T* construct_at(T* location, Args&&... args);
|
| 10 |
}
|
| 11 |
```
|
| 12 |
|
| 13 |
-
*Constraints:* The expression
|
| 14 |
`::new (declval<void*>()) T(declval<Args>()...)` is well-formed when
|
| 15 |
treated as an unevaluated operand [[term.unevaluated.operand]].
|
| 16 |
|
|
|
|
|
|
|
| 17 |
*Effects:* Equivalent to:
|
| 18 |
|
| 19 |
``` cpp
|
|
|
|
|
|
|
|
|
|
| 20 |
return ::new (voidify(*location)) T(std::forward<Args>(args)...);
|
| 21 |
```
|
| 22 |
|
|
|
|
| 8 |
template<class T, class... Args>
|
| 9 |
constexpr T* construct_at(T* location, Args&&... args);
|
| 10 |
}
|
| 11 |
```
|
| 12 |
|
| 13 |
+
*Constraints:* `is_unbounded_array_v<T>` is `false`. The expression
|
| 14 |
`::new (declval<void*>()) T(declval<Args>()...)` is well-formed when
|
| 15 |
treated as an unevaluated operand [[term.unevaluated.operand]].
|
| 16 |
|
| 17 |
+
*Mandates:* If `is_array_v<T>` is `true`, `sizeof...(Args)` is zero.
|
| 18 |
+
|
| 19 |
*Effects:* Equivalent to:
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
+
if constexpr (is_array_v<T>)
|
| 23 |
+
return ::new (voidify(*location)) T[1]();
|
| 24 |
+
else
|
| 25 |
return ::new (voidify(*location)) T(std::forward<Args>(args)...);
|
| 26 |
```
|
| 27 |
|