You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-a pointer to an incomplete type other than (possibly cv-qualified) `void`
68
-
-an lvalue reference to an incomplete type
64
+
- an <DocLinkdest="/cpp/language/basic_concepts/definition#Incomplete_type">incomplete type</DocLink>
65
+
- an <DocLinkdest="/cpp/language/classes#Abstract_classes">abstract class type</DocLink>
66
+
- an <DocLinkdest="/cpp/language/reference#Rvalue_reference"><Revisionsince="C++11">rvalue reference type</Revision></DocLink>
67
+
- a pointer to an incomplete type other than (possibly cv-qualified) `void`
68
+
- an lvalue reference to an incomplete type
69
69
70
70
If the parameter is declared to have type “array of `T`” or function type `T`, the type is adjusted to “pointer to `T`”.
71
71
@@ -77,15 +77,15 @@ Each `try` block associates with a number of handlers, these handlers form a han
77
77
78
78
A handler is a match for an <DocLinkdest="/cpp/language/exceptions/throwing_exceptions#Exception_object">exception object</DocLink> of type `E` if any of the following conditions is satisfied:
79
79
80
-
-The handler is of type “possibly cv-qualified `T`” or “lvalue reference to possibly cv-qualified `T`”, and any of the following conditions is satisfied:
81
-
-`E` and `T` are the same type (ignoring the top-level cv-qualifiers).
82
-
-`T` is an unambiguous public base class of `E`.
83
-
-The handler is of type “possibly cv-qualified `T`” or `const T&` where `T` is a pointer or pointer-to-member type, and any of the following conditions is satisfied:
84
-
-`E` is a pointer or pointer-to-member type that can be converted to `T` by at least one of the following conversions:
85
-
-A <DocLinkdest="/cpp/language/implicit_cast#Pointer_conversions">standard pointer conversion</DocLink> not involving conversions to pointers to private or protected or ambiguous classes.
-A <DocLinkdest="/cpp/language/implicit_cast#Qualification_conversions">qualification conversion</DocLink>.
88
-
-<Revisionsince="C++11">`E` is <DocLinkdest="/cpp/types/nullptr_t">std::nullptr_t</DocLink>.</Revision>
80
+
- The handler is of type “possibly cv-qualified `T`” or “lvalue reference to possibly cv-qualified `T`”, and any of the following conditions is satisfied:
81
+
-`E` and `T` are the same type (ignoring the top-level cv-qualifiers).
82
+
-`T` is an unambiguous public base class of `E`.
83
+
- The handler is of type “possibly cv-qualified `T`” or `const T&` where `T` is a pointer or pointer-to-member type, and any of the following conditions is satisfied:
84
+
-`E` is a pointer or pointer-to-member type that can be converted to `T` by at least one of the following conversions:
85
+
- A <DocLinkdest="/cpp/language/implicit_cast#Pointer_conversions">standard pointer conversion</DocLink> not involving conversions to pointers to private or protected or ambiguous classes.
- A <DocLinkdest="/cpp/language/implicit_cast#Qualification_conversions">qualification conversion</DocLink>.
88
+
- <Revisionsince="C++11">`E` is <DocLinkdest="/cpp/types/nullptr_t">std::nullptr_t</DocLink>.</Revision>
89
89
90
90
The `catch (...)` handler matches exceptions of any type. If present, it can only be the last handler in a handler sequence. This handler may be used to ensure that no uncaught exceptions can possibly escape from a function that offers <DocLinkdest="/cpp/language/exceptions">nothrow exception guarantee</DocLink>.
91
91
```cpp
@@ -114,8 +114,8 @@ When an exception is thrown, control is transferred to the nearest handler with
114
114
115
115
The parameter declared in the parameter list (if any), of type “possibly cv-qualified `T`” or “lvalue reference to possibly cv-qualified `T`”, is initialized from the <DocLinkdest="/cpp/language/exceptions/throwing_exceptions#Exception_object">exception object</DocLink>, of type `E`, as follows:
116
116
117
-
-If `T` is a base class of `E`, the parameter is <DocLinkdest="/cpp/language/copy_initialization">copy-initialized</DocLink> from an lvalue of type `T` designating the corresponding base class subobject of the exception object.
118
-
-Otherwise, the parameter is copy-initialized from an lvalue of type `E` designating the exception object.
117
+
- If `T` is a base class of `E`, the parameter is <DocLinkdest="/cpp/language/copy_initialization">copy-initialized</DocLink> from an lvalue of type `T` designating the corresponding base class subobject of the exception object.
118
+
- Otherwise, the parameter is copy-initialized from an lvalue of type `E` designating the exception object.
119
119
120
120
The lifetime of the parameter ends when the handler exits, after the destruction of any objects with automatic <DocLinkdest="/cpp/language/storage_duration">storage duration</DocLink> initialized within the handler.
121
121
@@ -159,7 +159,7 @@ void f()
159
159
160
160
The exception thrown by the `throw` expression `throw 0` does not match a handler of pointer or pointer-to-member type.
161
161
162
-
-<Revisionsince="C++11">`throw nullptr` can be used instead to throw a null pointer that matches such handlers.</Revision>
162
+
- <Revisionsince="C++11">`throw nullptr` can be used instead to throw a null pointer that matches such handlers.</Revision>
163
163
164
164
<DocLinkdest="/cpp/language/exceptions/throwing_exceptions#Exception_object">Exception objects</DocLink> can never have array or function types, therefore a handler of reference to array or function type is never a match for any exception object.
0 commit comments