From Jason Turner

[except.handle]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpudkwan98/{from.md → to.md} +12 -16
tmp/tmpudkwan98/{from.md → to.md} RENAMED
@@ -3,12 +3,11 @@
3
  The *exception-declaration* in a *handler* describes the type(s) of
4
  exceptions that can cause that *handler* to be entered. The
5
  *exception-declaration* shall not denote an incomplete type, an abstract
6
  class type, or an rvalue reference type. The *exception-declaration*
7
  shall not denote a pointer or reference to an incomplete type, other
8
- than `void*`, `const` `void*`, `volatile` `void*`, or `const` `volatile`
9
- `void*`.
10
 
11
  A handler of type “array of `T`” or function type `T` is adjusted to be
12
  of type “pointer to `T`”.
13
 
14
  A *handler* is a match for an exception object of type `E` if
@@ -86,27 +85,24 @@ considered active when the catch clause exits.
86
 
87
  The exception with the most recently activated handler that is still
88
  active is called the *currently handled exception*.
89
 
90
  If no matching handler is found, the function `std::terminate` is
91
- called; whether or not the stack is unwound before this call to
92
  `std::terminate` is *implementation-defined* [[except.terminate]].
93
 
94
  Referring to any non-static member or base class of an object in the
95
  handler for a *function-try-block* of a constructor or destructor for
96
  that object results in undefined behavior.
97
 
98
- The scope and lifetime of the parameters of a function or constructor
99
- extend into the handlers of a *function-try-block*.
100
-
101
  Exceptions thrown in destructors of objects with static storage duration
102
- or in constructors of namespace-scope objects with static storage
103
- duration are not caught by a *function-try-block* on the `main` function
104
- [[basic.start.main]]. Exceptions thrown in destructors of objects with
105
- thread storage duration or in constructors of namespace-scope objects
106
- with thread storage duration are not caught by a *function-try-block* on
107
- the initial function of the thread.
108
 
109
  If a `return` statement [[stmt.return]] appears in a handler of the
110
  *function-try-block* of a constructor, the program is ill-formed.
111
 
112
  The currently handled exception is rethrown if control reaches the end
@@ -118,14 +114,14 @@ of the *compound-statement* of that function (see [[stmt.return]]).
118
  The variable declared by the *exception-declaration*, of type cv `T` or
119
  cv `T&`, is initialized from the exception object, of type `E`, as
120
  follows:
121
 
122
  - if `T` is a base class of `E`, the variable is copy-initialized
123
- [[dcl.init]] from the corresponding base class subobject of the
124
- exception object;
125
- - otherwise, the variable is copy-initialized [[dcl.init]] from the
126
- exception object.
127
 
128
  The lifetime of the variable ends when the handler exits, after the
129
  destruction of any objects with automatic storage duration initialized
130
  within the handler.
131
 
 
3
  The *exception-declaration* in a *handler* describes the type(s) of
4
  exceptions that can cause that *handler* to be entered. The
5
  *exception-declaration* shall not denote an incomplete type, an abstract
6
  class type, or an rvalue reference type. The *exception-declaration*
7
  shall not denote a pointer or reference to an incomplete type, other
8
+ than “pointer to cv `void`”.
 
9
 
10
  A handler of type “array of `T`” or function type `T` is adjusted to be
11
  of type “pointer to `T`”.
12
 
13
  A *handler* is a match for an exception object of type `E` if
 
85
 
86
  The exception with the most recently activated handler that is still
87
  active is called the *currently handled exception*.
88
 
89
  If no matching handler is found, the function `std::terminate` is
90
+ invoked; whether or not the stack is unwound before this invocation of
91
  `std::terminate` is *implementation-defined* [[except.terminate]].
92
 
93
  Referring to any non-static member or base class of an object in the
94
  handler for a *function-try-block* of a constructor or destructor for
95
  that object results in undefined behavior.
96
 
 
 
 
97
  Exceptions thrown in destructors of objects with static storage duration
98
+ or in constructors of objects associated with non-block variables with
99
+ static storage duration are not caught by a *function-try-block* on the
100
+ `main` function [[basic.start.main]]. Exceptions thrown in destructors
101
+ of objects with thread storage duration or in constructors of objects
102
+ associated with non-block variables with thread storage duration are not
103
+ caught by a *function-try-block* on the initial function of the thread.
104
 
105
  If a `return` statement [[stmt.return]] appears in a handler of the
106
  *function-try-block* of a constructor, the program is ill-formed.
107
 
108
  The currently handled exception is rethrown if control reaches the end
 
114
  The variable declared by the *exception-declaration*, of type cv `T` or
115
  cv `T&`, is initialized from the exception object, of type `E`, as
116
  follows:
117
 
118
  - if `T` is a base class of `E`, the variable is copy-initialized
119
+ [[dcl.init]] from an lvalue of type `T` designating the corresponding
120
+ base class subobject of the exception object;
121
+ - otherwise, the variable is copy-initialized [[dcl.init]] from an
122
+ lvalue of type `E` designating the exception object.
123
 
124
  The lifetime of the variable ends when the handler exits, after the
125
  destruction of any objects with automatic storage duration initialized
126
  within the handler.
127