From Jason Turner

[support.exception]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp33erg109/{from.md → to.md} +6 -11
tmp/tmp33erg109/{from.md → to.md} RENAMED
@@ -25,11 +25,11 @@ namespace std {
25
 
26
  exception_ptr current_exception() noexcept;
27
  [[noreturn]] void rethrow_exception(exception_ptr p);
28
  template<class E> exception_ptr make_exception_ptr(E e) noexcept;
29
 
30
- [[noreturn]] template <class T> void throw_with_nested(T&& t);
31
  template <class E> void rethrow_if_nested(const E& e);
32
  }
33
  ```
34
 
35
    [[except.special]].
@@ -64,12 +64,10 @@ of `rhs`, then `strcmp(lhs.what(), rhs.what())` shall equal 0.
64
  exception() noexcept;
65
  ```
66
 
67
  *Effects:* Constructs an object of class `exception`.
68
 
69
- *Remarks:* Does not throw any exceptions.
70
-
71
  ``` cpp
72
  exception(const exception& rhs) noexcept;
73
  exception& operator=(const exception& rhs) noexcept;
74
  ```
75
 
@@ -82,12 +80,10 @@ If `*this` and `rhs` both have dynamic type `exception` then
82
  virtual ~exception();
83
  ```
84
 
85
  *Effects:* Destroys an object of class `exception`.
86
 
87
- *Remarks:* Does not throw any exceptions.
88
-
89
  ``` cpp
90
  virtual const char* what() const noexcept;
91
  ```
92
 
93
  *Returns:* An *implementation-defined* NTBS.
@@ -188,13 +184,12 @@ value.
188
  [[noreturn]] void terminate() noexcept;
189
  ```
190
 
191
  *Remarks:* Called by the implementation when exception handling must be
192
  abandoned for any of several reasons ([[except.terminate]]), in effect
193
- immediately after evaluating the
194
- *throw-expression* ([[terminate.handler]]). May also be called directly
195
- by the program.
196
 
197
  *Effects:* Calls the current `terminate_handler` function. A default
198
  `terminate_handler` is always considered a callable handler in this
199
  context.
200
 
@@ -307,11 +302,11 @@ namespace std {
307
  // access functions
308
  [[noreturn]] void rethrow_nested() const;
309
  exception_ptr nested_ptr() const noexcept;
310
  };
311
 
312
- [[noreturn]] template<class T> void throw_with_nested(T&& t);
313
  template <class E> void rethrow_if_nested(const E& e);
314
  }
315
  ```
316
 
317
  The class `nested_exception` is designed for use as a mixin through
@@ -342,14 +337,14 @@ exception_ptr nested_ptr() const noexcept;
342
 
343
  *Returns:* The stored exception captured by this `nested_exception`
344
  object.
345
 
346
  ``` cpp
347
- [[noreturn]] template <class T> void throw_with_nested(T&& t);
348
  ```
349
 
350
- Let `U` be `remove_reference<T>::type`.
351
 
352
  *Requires:* `U` shall be `CopyConstructible`.
353
 
354
  *Throws:* if `U` is a non-union class type not derived from
355
  `nested_exception`, an exception of unspecified type that is publicly
 
25
 
26
  exception_ptr current_exception() noexcept;
27
  [[noreturn]] void rethrow_exception(exception_ptr p);
28
  template<class E> exception_ptr make_exception_ptr(E e) noexcept;
29
 
30
+ template <class T> [[noreturn]] void throw_with_nested(T&& t);
31
  template <class E> void rethrow_if_nested(const E& e);
32
  }
33
  ```
34
 
35
    [[except.special]].
 
64
  exception() noexcept;
65
  ```
66
 
67
  *Effects:* Constructs an object of class `exception`.
68
 
 
 
69
  ``` cpp
70
  exception(const exception& rhs) noexcept;
71
  exception& operator=(const exception& rhs) noexcept;
72
  ```
73
 
 
80
  virtual ~exception();
81
  ```
82
 
83
  *Effects:* Destroys an object of class `exception`.
84
 
 
 
85
  ``` cpp
86
  virtual const char* what() const noexcept;
87
  ```
88
 
89
  *Returns:* An *implementation-defined* NTBS.
 
184
  [[noreturn]] void terminate() noexcept;
185
  ```
186
 
187
  *Remarks:* Called by the implementation when exception handling must be
188
  abandoned for any of several reasons ([[except.terminate]]), in effect
189
+ immediately after throwing the exception. May also be called directly by
190
+ the program.
 
191
 
192
  *Effects:* Calls the current `terminate_handler` function. A default
193
  `terminate_handler` is always considered a callable handler in this
194
  context.
195
 
 
302
  // access functions
303
  [[noreturn]] void rethrow_nested() const;
304
  exception_ptr nested_ptr() const noexcept;
305
  };
306
 
307
+ template<class T> [[noreturn]] void throw_with_nested(T&& t);
308
  template <class E> void rethrow_if_nested(const E& e);
309
  }
310
  ```
311
 
312
  The class `nested_exception` is designed for use as a mixin through
 
337
 
338
  *Returns:* The stored exception captured by this `nested_exception`
339
  object.
340
 
341
  ``` cpp
342
+ template <class T> [[noreturn]] void throw_with_nested(T&& t);
343
  ```
344
 
345
+ Let `U` be `remove_reference_t<T>`.
346
 
347
  *Requires:* `U` shall be `CopyConstructible`.
348
 
349
  *Throws:* if `U` is a non-union class type not derived from
350
  `nested_exception`, an exception of unspecified type that is publicly