tmp/tmpoqk5vtqo/{from.md → to.md}
RENAMED
|
@@ -21,10 +21,19 @@ namespace std {
|
|
| 21 |
|
| 22 |
// [refwrap.invoke], invocation
|
| 23 |
template<class... ArgTypes>
|
| 24 |
constexpr invoke_result_t<T&, ArgTypes...> operator()(ArgTypes&&...) const
|
| 25 |
noexcept(is_nothrow_invocable_v<T&, ArgTypes...>);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
};
|
| 27 |
|
| 28 |
template<class T>
|
| 29 |
reference_wrapper(T&) -> reference_wrapper<T>;
|
| 30 |
}
|
|
@@ -38,5 +47,10 @@ function of type `T`.
|
|
| 38 |
[[term.trivially.copyable.type]].
|
| 39 |
|
| 40 |
The template parameter `T` of `reference_wrapper` may be an incomplete
|
| 41 |
type.
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
// [refwrap.invoke], invocation
|
| 23 |
template<class... ArgTypes>
|
| 24 |
constexpr invoke_result_t<T&, ArgTypes...> operator()(ArgTypes&&...) const
|
| 25 |
noexcept(is_nothrow_invocable_v<T&, ArgTypes...>);
|
| 26 |
+
|
| 27 |
+
// [refwrap.comparisons], comparisons
|
| 28 |
+
friend constexpr bool operator==(reference_wrapper, reference_wrapper);
|
| 29 |
+
friend constexpr bool operator==(reference_wrapper, const T&);
|
| 30 |
+
friend constexpr bool operator==(reference_wrapper, reference_wrapper<const T>);
|
| 31 |
+
|
| 32 |
+
friend constexpr auto operator<=>(reference_wrapper, reference_wrapper);
|
| 33 |
+
friend constexpr auto operator<=>(reference_wrapper, const T&);
|
| 34 |
+
friend constexpr auto operator<=>(reference_wrapper, reference_wrapper<const T>);
|
| 35 |
};
|
| 36 |
|
| 37 |
template<class T>
|
| 38 |
reference_wrapper(T&) -> reference_wrapper<T>;
|
| 39 |
}
|
|
|
|
| 47 |
[[term.trivially.copyable.type]].
|
| 48 |
|
| 49 |
The template parameter `T` of `reference_wrapper` may be an incomplete
|
| 50 |
type.
|
| 51 |
|
| 52 |
+
[*Note 1*: Using the comparison operators described in
|
| 53 |
+
[[refwrap.comparisons]] with `T` being an incomplete type can lead to an
|
| 54 |
+
ill-formed program with no diagnostic required
|
| 55 |
+
[[temp.point]], [[temp.constr.atomic]]. — *end note*]
|
| 56 |
+
|