tmp/tmpomgf6q0c/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Pointer conversion <a id="pointer.conversion">[[pointer.conversion]]</a>
|
| 2 |
+
|
| 3 |
+
``` cpp
|
| 4 |
+
template<class T> constexpr T* to_address(T* p) noexcept;
|
| 5 |
+
```
|
| 6 |
+
|
| 7 |
+
*Mandates:* `T` is not a function type.
|
| 8 |
+
|
| 9 |
+
*Returns:* `p`.
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
template<class Ptr> constexpr auto to_address(const Ptr& p) noexcept;
|
| 13 |
+
```
|
| 14 |
+
|
| 15 |
+
*Returns:* `pointer_traits<Ptr>::to_address(p)` if that expression is
|
| 16 |
+
well-formed (see [[pointer.traits.optmem]]), otherwise
|
| 17 |
+
`to_address(p.operator->())`.
|
| 18 |
+
|