tmp/tmpydhwjj08/{from.md → to.md}
RENAMED
|
@@ -1,26 +1,29 @@
|
|
| 1 |
-
####
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
-
template
|
| 5 |
```
|
| 6 |
|
| 7 |
*Returns:* `reference_wrapper<T>(t)`.
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
-
template
|
| 11 |
```
|
| 12 |
|
| 13 |
*Returns:* `ref(t.get())`.
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
-
template
|
| 17 |
```
|
| 18 |
|
| 19 |
*Returns:* `reference_wrapper <const T>(t)`.
|
| 20 |
|
| 21 |
``` cpp
|
| 22 |
-
template
|
| 23 |
```
|
| 24 |
|
| 25 |
*Returns:* `cref(t.get())`.
|
| 26 |
|
|
|
|
| 1 |
+
#### Helper functions <a id="refwrap.helpers">[[refwrap.helpers]]</a>
|
| 2 |
+
|
| 3 |
+
The template parameter `T` of the following `ref` and `cref` function
|
| 4 |
+
templates may be an incomplete type.
|
| 5 |
|
| 6 |
``` cpp
|
| 7 |
+
template<class T> constexpr reference_wrapper<T> ref(T& t) noexcept;
|
| 8 |
```
|
| 9 |
|
| 10 |
*Returns:* `reference_wrapper<T>(t)`.
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
+
template<class T> constexpr reference_wrapper<T> ref(reference_wrapper<T> t) noexcept;
|
| 14 |
```
|
| 15 |
|
| 16 |
*Returns:* `ref(t.get())`.
|
| 17 |
|
| 18 |
``` cpp
|
| 19 |
+
template<class T> constexpr reference_wrapper<const T> cref(const T& t) noexcept;
|
| 20 |
```
|
| 21 |
|
| 22 |
*Returns:* `reference_wrapper <const T>(t)`.
|
| 23 |
|
| 24 |
``` cpp
|
| 25 |
+
template<class T> constexpr reference_wrapper<const T> cref(reference_wrapper<T> t) noexcept;
|
| 26 |
```
|
| 27 |
|
| 28 |
*Returns:* `cref(t.get())`.
|
| 29 |
|