tmp/tmp84v3_4am/{from.md → to.md}
RENAMED
|
@@ -25,11 +25,11 @@ namespace std {
|
|
| 25 |
template<class T>
|
| 26 |
constexpr T&& forward(remove_reference_t<T>& t) noexcept;
|
| 27 |
template<class T>
|
| 28 |
constexpr T&& forward(remove_reference_t<T>&& t) noexcept;
|
| 29 |
template<class T, class U>
|
| 30 |
-
|
| 31 |
template<class T>
|
| 32 |
constexpr remove_reference_t<T>&& move(T&&) noexcept;
|
| 33 |
template<class T>
|
| 34 |
constexpr conditional_t<
|
| 35 |
!is_nothrow_move_constructible_v<T> && is_copy_constructible_v<T>, const T&, T&&>
|
|
@@ -65,12 +65,13 @@ namespace std {
|
|
| 65 |
|
| 66 |
// [utility.underlying], to_underlying
|
| 67 |
template<class T>
|
| 68 |
constexpr underlying_type_t<T> to_underlying(T value) noexcept;
|
| 69 |
|
| 70 |
-
// [utility.
|
| 71 |
[[noreturn]] void unreachable();
|
|
|
|
| 72 |
|
| 73 |
// [intseq], compile-time integer sequences%
|
| 74 |
%
|
| 75 |
%
|
| 76 |
|
|
@@ -183,10 +184,33 @@ namespace std {
|
|
| 183 |
template<size_t I>
|
| 184 |
struct in_place_index_t {
|
| 185 |
explicit in_place_index_t() = default;
|
| 186 |
};
|
| 187 |
template<size_t I> constexpr in_place_index_t<I> in_place_index{};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 188 |
}
|
| 189 |
```
|
| 190 |
|
| 191 |
### `swap` <a id="utility.swap">[[utility.swap]]</a>
|
| 192 |
|
|
@@ -287,11 +311,11 @@ constructor as an lvalue. In both cases, `A2` is deduced as `double`, so
|
|
| 287 |
|
| 288 |
— *end example*]
|
| 289 |
|
| 290 |
``` cpp
|
| 291 |
template<class T, class U>
|
| 292 |
-
|
| 293 |
```
|
| 294 |
|
| 295 |
*Mandates:* `T` is a referenceable type [[defns.referenceable]].
|
| 296 |
|
| 297 |
- Let *`COPY_CONST`*`(A, B)` be `const B` if `A` is a const type,
|
|
@@ -506,11 +530,11 @@ template<class T>
|
|
| 506 |
constexpr underlying_type_t<T> to_underlying(T value) noexcept;
|
| 507 |
```
|
| 508 |
|
| 509 |
*Returns:* `static_cast<underlying_type_t<T>>(value)`.
|
| 510 |
|
| 511 |
-
###
|
| 512 |
|
| 513 |
``` cpp
|
| 514 |
[[noreturn]] void unreachable();
|
| 515 |
```
|
| 516 |
|
|
@@ -535,5 +559,11 @@ int a = f(1); // OK, a has value 1
|
|
| 535 |
int b = f(3); // undefined behavior
|
| 536 |
```
|
| 537 |
|
| 538 |
— *end example*]
|
| 539 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
template<class T>
|
| 26 |
constexpr T&& forward(remove_reference_t<T>& t) noexcept;
|
| 27 |
template<class T>
|
| 28 |
constexpr T&& forward(remove_reference_t<T>&& t) noexcept;
|
| 29 |
template<class T, class U>
|
| 30 |
+
constexpr auto forward_like(U&& x) noexcept -> see below;
|
| 31 |
template<class T>
|
| 32 |
constexpr remove_reference_t<T>&& move(T&&) noexcept;
|
| 33 |
template<class T>
|
| 34 |
constexpr conditional_t<
|
| 35 |
!is_nothrow_move_constructible_v<T> && is_copy_constructible_v<T>, const T&, T&&>
|
|
|
|
| 65 |
|
| 66 |
// [utility.underlying], to_underlying
|
| 67 |
template<class T>
|
| 68 |
constexpr underlying_type_t<T> to_underlying(T value) noexcept;
|
| 69 |
|
| 70 |
+
// [utility.undefined], undefined behavior
|
| 71 |
[[noreturn]] void unreachable();
|
| 72 |
+
void observable_checkpoint() noexcept;
|
| 73 |
|
| 74 |
// [intseq], compile-time integer sequences%
|
| 75 |
%
|
| 76 |
%
|
| 77 |
|
|
|
|
| 184 |
template<size_t I>
|
| 185 |
struct in_place_index_t {
|
| 186 |
explicit in_place_index_t() = default;
|
| 187 |
};
|
| 188 |
template<size_t I> constexpr in_place_index_t<I> in_place_index{};
|
| 189 |
+
|
| 190 |
+
// nontype argument tag%
|
| 191 |
+
%
|
| 192 |
+
|
| 193 |
+
template<auto V>
|
| 194 |
+
struct nontype_t {
|
| 195 |
+
explicit nontype_t() = default;
|
| 196 |
+
};
|
| 197 |
+
template<auto V> constexpr nontype_t<V> nontype{};
|
| 198 |
+
|
| 199 |
+
// [variant.monostate], class monostate%
|
| 200 |
+
|
| 201 |
+
struct monostate;
|
| 202 |
+
|
| 203 |
+
// [variant.monostate.relops], monostate relational operators%
|
| 204 |
+
{monostate{monostate}
|
| 205 |
+
constexpr bool operator==(monostate, monostate) noexcept;
|
| 206 |
+
constexpr strong_ordering operator<=>(monostate, monostate) noexcept;
|
| 207 |
+
|
| 208 |
+
// [variant.hash], hash support%
|
| 209 |
+
{monostate}
|
| 210 |
+
template<class T> struct hash;
|
| 211 |
+
template<> struct hash<monostate>;
|
| 212 |
}
|
| 213 |
```
|
| 214 |
|
| 215 |
### `swap` <a id="utility.swap">[[utility.swap]]</a>
|
| 216 |
|
|
|
|
| 311 |
|
| 312 |
— *end example*]
|
| 313 |
|
| 314 |
``` cpp
|
| 315 |
template<class T, class U>
|
| 316 |
+
constexpr auto forward_like(U&& x) noexcept -> see below;
|
| 317 |
```
|
| 318 |
|
| 319 |
*Mandates:* `T` is a referenceable type [[defns.referenceable]].
|
| 320 |
|
| 321 |
- Let *`COPY_CONST`*`(A, B)` be `const B` if `A` is a const type,
|
|
|
|
| 530 |
constexpr underlying_type_t<T> to_underlying(T value) noexcept;
|
| 531 |
```
|
| 532 |
|
| 533 |
*Returns:* `static_cast<underlying_type_t<T>>(value)`.
|
| 534 |
|
| 535 |
+
### Undefined behavior <a id="utility.undefined">[[utility.undefined]]</a>
|
| 536 |
|
| 537 |
``` cpp
|
| 538 |
[[noreturn]] void unreachable();
|
| 539 |
```
|
| 540 |
|
|
|
|
| 559 |
int b = f(3); // undefined behavior
|
| 560 |
```
|
| 561 |
|
| 562 |
— *end example*]
|
| 563 |
|
| 564 |
+
``` cpp
|
| 565 |
+
void observable_checkpoint() noexcept;
|
| 566 |
+
```
|
| 567 |
+
|
| 568 |
+
*Effects:* Establishes an observable checkpoint [[intro.abstract]].
|
| 569 |
+
|