From Jason Turner

[alloc.errors]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmptby8gp53/{from.md → to.md} +5 -34
tmp/tmptby8gp53/{from.md → to.md} RENAMED
@@ -4,86 +4,57 @@
4
 
5
  ``` cpp
6
  namespace std {
7
  class bad_alloc : public exception {
8
  public:
9
- bad_alloc() noexcept;
10
- bad_alloc(const bad_alloc&) noexcept;
11
- bad_alloc& operator=(const bad_alloc&) noexcept;
12
  const char* what() const noexcept override;
13
  };
14
  }
15
  ```
16
 
17
  The class `bad_alloc` defines the type of objects thrown as exceptions
18
  by the implementation to report a failure to allocate storage.
19
 
20
- ``` cpp
21
- bad_alloc() noexcept;
22
- ```
23
-
24
- *Effects:* Constructs an object of class `bad_alloc`.
25
-
26
- ``` cpp
27
- bad_alloc(const bad_alloc&) noexcept;
28
- bad_alloc& operator=(const bad_alloc&) noexcept;
29
- ```
30
-
31
- *Effects:* Copies an object of class `bad_alloc`.
32
-
33
  ``` cpp
34
  const char* what() const noexcept override;
35
  ```
36
 
37
  *Returns:* An *implementation-defined* NTBS.
38
 
39
- *Remarks:* The message may be a null-terminated multibyte
40
- string ([[multibyte.strings]]), suitable for conversion and display as
41
- a `wstring` ([[string.classes]], [[locale.codecvt]]).
42
-
43
  #### Class `bad_array_new_length` <a id="new.badlength">[[new.badlength]]</a>
44
 
45
  ``` cpp
46
  namespace std {
47
  class bad_array_new_length : public bad_alloc {
48
  public:
49
- bad_array_new_length() noexcept;
50
  const char* what() const noexcept override;
51
  };
52
  }
53
  ```
54
 
55
  The class `bad_array_new_length` defines the type of objects thrown as
56
  exceptions by the implementation to report an attempt to allocate an
57
  array of size less than zero or greater than an *implementation-defined*
58
- limit ([[expr.new]]).
59
-
60
- ``` cpp
61
- bad_array_new_length() noexcept;
62
- ```
63
-
64
- *Effects:* constructs an object of class `bad_array_new_length`.
65
 
66
  ``` cpp
67
  const char* what() const noexcept override;
68
  ```
69
 
70
  *Returns:* An *implementation-defined* NTBS.
71
 
72
- *Remarks:* The message may be a null-terminated multibyte
73
- string ([[multibyte.strings]]), suitable for conversion and display as
74
- a `wstring` ([[string.classes]], [[locale.codecvt]]).
75
-
76
  #### Type `new_handler` <a id="new.handler">[[new.handler]]</a>
77
 
78
  ``` cpp
79
  using new_handler = void (*)();
80
  ```
81
 
82
  The type of a *handler function* to be called by `operator new()` or
83
- `operator new[]()` ([[new.delete]]) when they cannot satisfy a request
84
- for additional storage.
85
 
86
  *Required behavior:* A `new_handler` shall perform one of the following:
87
 
88
  - make more storage available for allocation and then return;
89
  - throw an exception of type `bad_alloc` or a class derived from
 
4
 
5
  ``` cpp
6
  namespace std {
7
  class bad_alloc : public exception {
8
  public:
9
+ // see [exception] for the specification of the special member functions
 
 
10
  const char* what() const noexcept override;
11
  };
12
  }
13
  ```
14
 
15
  The class `bad_alloc` defines the type of objects thrown as exceptions
16
  by the implementation to report a failure to allocate storage.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ``` cpp
19
  const char* what() const noexcept override;
20
  ```
21
 
22
  *Returns:* An *implementation-defined* NTBS.
23
 
 
 
 
 
24
  #### Class `bad_array_new_length` <a id="new.badlength">[[new.badlength]]</a>
25
 
26
  ``` cpp
27
  namespace std {
28
  class bad_array_new_length : public bad_alloc {
29
  public:
30
+ // see [exception] for the specification of the special member functions
31
  const char* what() const noexcept override;
32
  };
33
  }
34
  ```
35
 
36
  The class `bad_array_new_length` defines the type of objects thrown as
37
  exceptions by the implementation to report an attempt to allocate an
38
  array of size less than zero or greater than an *implementation-defined*
39
+ limit [[expr.new]].
 
 
 
 
 
 
40
 
41
  ``` cpp
42
  const char* what() const noexcept override;
43
  ```
44
 
45
  *Returns:* An *implementation-defined* NTBS.
46
 
 
 
 
 
47
  #### Type `new_handler` <a id="new.handler">[[new.handler]]</a>
48
 
49
  ``` cpp
50
  using new_handler = void (*)();
51
  ```
52
 
53
  The type of a *handler function* to be called by `operator new()` or
54
+ `operator new[]()` [[new.delete]] when they cannot satisfy a request for
55
+ additional storage.
56
 
57
  *Required behavior:* A `new_handler` shall perform one of the following:
58
 
59
  - make more storage available for allocation and then return;
60
  - throw an exception of type `bad_alloc` or a class derived from