tmp/tmps6ph8ndd/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Function pointer conversions <a id="conv.fctptr">[[conv.fctptr]]</a>
|
| 2 |
+
|
| 3 |
+
A prvalue of type “pointer to `noexcept` function” can be converted to a
|
| 4 |
+
prvalue of type “pointer to function”. The result is a pointer to the
|
| 5 |
+
function. A prvalue of type “pointer to member of type `noexcept`
|
| 6 |
+
function” can be converted to a prvalue of type “pointer to member of
|
| 7 |
+
type function”. The result points to the member function.
|
| 8 |
+
|
| 9 |
+
[*Example 1*:
|
| 10 |
+
|
| 11 |
+
``` cpp
|
| 12 |
+
void (*p)();
|
| 13 |
+
void (**pp)() noexcept = &p; // error: cannot convert to pointer to noexcept function
|
| 14 |
+
|
| 15 |
+
struct S { typedef void (*p)(); operator p(); };
|
| 16 |
+
void (*q)() noexcept = S(); // error: cannot convert to pointer to noexcept function
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
— *end example*]
|
| 20 |
+
|